[英]java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbo;
[英]java.lang.NoClassDefFoundError: com.google.android.gms.common.internal.zzbo
我知道這個問題可能是重復的,但是我嘗試了許多解決方案,但無法使我的應用程序正常工作。 應該注意的是,我已經啟用了Multidex,但是仍然低於錯誤。 我正在創建一個本機應用程序 。
FATAL EXCEPTION: main
Process: com.xxxxxx.yyyyyyyy, PID: 3978
java.lang.NoClassDefFoundError: com.google.android.gms.common.internal.zzbo
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:5049)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4623)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4563)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5333)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(Native Method)
如果您正在開發React Native應用程序並且出現上述錯誤,則只需確保所有依賴項的Gradle都使用相同版本的firebase servces並播放service base即可 。 例如:-我的應用程序級別gradle文件包含
compile "com.google.android.gms:play-services-base:11.4.0"
compile "com.google.firebase:firebase-core:11.4.0"
compile "com.google.firebase:firebase-messaging:11.4.0"
compile "com.google.firebase:firebase-analytics:11.4.0"
compile "com.google.firebase:firebase-crash:11.4.0"
compile "com.google.firebase:firebase-ads:11.4.0"
一個反應本機庫正在使用
compile "com.google.android.gms:play-services-base:11.8.0"
而另一個圖書館正在使用
compile "com.google.android.gms:play-services-base:+"
所以我做了,我將所有服務版本都更改為11.8.0 。
順便說一句,當您在Android Studio中打開react-native-project / android文件夾時,您可以看到所有庫或依賴項的漸變
我希望這能解決您的問題
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.