2016-08-23 61 views
2

我正在將幾個Google Play服務jar包(gcm & auth)打包到Adobe AIR for Android應用程序中。我從這些Play Services庫中提供的文件中獲得了相關的jar文件。我將這些罐子放入我的項目中的應用程序/庫文件夾,並編譯了apk。然而,當我啓動APK,我得到這個錯誤的logcat:java.lang.ClassNotFoundException:未在DexPathList上找到類

拋出java.lang.ClassNotFoundException:未找到路徑類 「com.google.android.gms.common.GooglePlayServicesUtil」:DexPathList [ [zip文件 「/data/app/air.com.me.andros-1/base.apk」]

當我嘗試在我的Java代碼來調用GooglePlayServicesUtil發生此錯誤。但是,這個錯誤沒有任何意義,因爲當我使用Apktool進行逆向工程時,GooglePlayServicesUtil顯示在我的apk中。看到這些截圖:

enter image description here

enter image description here

任何人遇到了類似的問題?

回答

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文件夾中。

相關問題