gpt4 book ai didi

android - ADT更新后的java.lang.NoClassDefFoundError : com. google.android.gms.gcm.GoogleCloudMessaging

转载 作者:太空狗 更新时间:2023-10-29 13:23:39 25 4
gpt4 key购买 nike

我收到这个错误:

07-16 13:56:12.341: E/AndroidRuntime(23287): java.lang.NoClassDefFoundError: com.google.android.gms.gcm.GoogleCloudMessaging

在我上周更新 ADT 之后。代码:

public GCMRegisterTask(Context acontext) {
this.context = acontext;
if (gcm == null) {
gcm = GoogleCloudMessaging.getInstance(context);
}
}

该项目没有显示任何编译错误,但是当我尝试在我的手机(Android 4.2,我也尝试过使用 Android 4.4 的一个表)中调试它时,出现了这个错误。我已经尝试了所有解决方法:

选中 Android 私有(private)库导出:

The library is perfectly setted

enter image description here

The export checkbox is ok

我也试过只在 libs/文件夹中包含 google-play-services.jar,但我遇到了同样的错误。

最佳答案

这就是问题所在:

Android - Could not find google-play-services_lib.apk! error

我从 java build path->Projects 中删除了 google-play-services,它成功了!

关于android - ADT更新后的java.lang.NoClassDefFoundError : com. google.android.gms.gcm.GoogleCloudMessaging,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24789701/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com