首页 文章

java.lang.ClassNotFoundException:没有在DexPathList上找到类

提问于
浏览
2

我将几个Google Play Services jar(gcm&auth)打包到Adobe AIR for Android应用程序中 . 我从这些Play服务库提供的 aar 文件中获取了相关的jar . 我将这些 jar 放入项目的 app/libs 文件夹中,并编译了apk . 但是,当我启动apk时,我在logcat中收到此错误:

java.lang.ClassNotFoundException:未在路径上找到“com.google.android.gms.common.GooglePlayServicesUtil”类:DexPathList [[zip file“/data/app/air.com.me.andros-1/base .apk文件“]

当我尝试在我的java代码中调用 GooglePlayServicesUtil 时发生此错误 . 但是,这个错误没有意义,因为当我用 Apktool 反向设计它时,我的apk中显然存在GooglePlayServicesUtil . 看这些截图:

enter image description here

.

enter image description here

有人遇到过类似的问题吗?

1 回答

  • 1

    我解决了这个问题!
    事实证明, GooglePlayServicesUtil.class 扩展了一个名为 zze 的混淆类 . 这个 zze.class 位于 app/build/intermediates/exploded-aar/com.google.android.gms/play-services-basement/9.4.0/ . 因此,在使用Adobe AIR构建最终的apk之前,我必须手动将包含此 zze 类的jar复制到我的app / libs文件夹中 .

相关问题