2016-06-18 16 views
5

我有一個可運行的應用程序,一切運行良好,但是當我使用MoPub應用更新它並生成新的已簽名APK並將其上載到Play商店時,一些用戶在其他用戶的設備上運行良好時報告了崩潰。找不到類'com.google.firebase.FirebaseOptions'

我在不同的設備上測試了很多應用程序,最終發現它墜毀的設備。

我調試的應用程序,並在Android顯示器

06-18 16:17:51.665 17951-17951/akhbar4all.com.akhbar4all W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/firebase/auth/FirebaseUser;) 06-18 16:17:51.665 17951-17951/akhbar4all.com.akhbar4all E/dalvikvm: Could not find class 'com.google.firebase.FirebaseApp$zza', referenced from method com.google.firebase.FirebaseApp.zza 06-18 16:17:51.665 17951-17951/akhbar4all.com.akhbar4all W/dalvikvm: VFY: unable to resolve check-cast 9003 (Lcom/google/firebase/FirebaseApp$zza;) in Lcom/google/firebase/FirebaseApp; 06-18 16:17:51.665 17951-17951/akhbar4all.com.akhbar4all D/dalvikvm: VFY: replacing opcode 0x1f at 0x0019 06-18 16:17:51.665 17951-17951/akhbar4all.com.akhbar4all D/dalvikvm: DexOpt: unable to opt direct call 0xec65 at 0x0b in Lcom/google/firebase/FirebaseApp;.getToken 06-18 16:17:51.665 17951-17951/akhbar4all.com.akhbar4all D/AndroidRuntime: Shutting down VM 06-18 16:17:51.665 17951-17951/akhbar4all.com.akhbar4all W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41bdc700) 06-18 16:17:51.685 17951-17951/akhbar4all.com.akhbar4all E/AndroidRuntime: FATAL EXCEPTION: main java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions at com.google.firebase.FirebaseApp.zzbu(Unknown Source) at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source) at android.content.ContentProvider.attachInfo(ContentProvider.java:1214) at android.content.ContentProvider.attachInfo(ContentProvider.java:1189) at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source) at android.app.ActivityThread.installProvider(ActivityThread.java:5119) at android.app.ActivityThread.installContentProviders(ActivityThread.java:4725) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4665) at android.app.ActivityThread.access$1400(ActivityThread.java:159) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1376) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5419) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862) at dalvik.system.NativeStart.main(Native Method)

發現這個錯誤代碼,但我很震驚,因爲我沒有使用任何Firebase api那麼,爲什麼會出現這種情況和如何解決?我會很樂意得到任何人的幫助。

回答

10

我解決了這個問題。

的問題是,他們是在火力錯誤,包括最新的谷歌播放服務9.0.2

所以我只選擇谷歌玩,我需要的服務,而不是整個服務不包括(火力)和一切正常

要安裝谷歌服務的,你需要什麼,不包括整個服務訪問這個link

+0

感謝解決我的問題。 – atifali

+0

你很棒,你救了我寶貴的時間。 – atifali

+0

謝謝,我也編譯multidex類來解決我的問題,但它使我的應用程序有點重,現在它更好地優化! –

0

謝謝,我也編過的multidex類來解決我的問題,但它使我的應用程序重一點,現在它是更好的優化!

這是隻編譯谷歌的服務,你會使用,而不是所有的編譯聲明'com.google.android.gms: play-services: 9.0.0'

現在我gradle這個文件看起來像這樣

//compile 'com.android.support:multidex:1.0.0' 
//compile 'com.google.android.gms:play-services:9.0.0' 
compile 'com.google.firebase:firebase-messaging:9.0.0' 
compile 'com.google.firebase:firebase-core:9.0.0' 
compile 'com.google.firebase:firebase-database:9.0.0' 
compile 'com.google.android.gms:play-services-location:9.0.0'