gpt4 book ai didi

android - 如何修复 java.lang.NoClassDefFoundError : Failed resolution of: Lcom/google/android/gms/common/R$string in android studio 3. 6.1?

转载 作者:行者123 更新时间:2023-12-03 03:07:10 28 4
gpt4 key购买 nike

我已将 android studio 3.6.1 和 com.google.gms:google-services 更新到 4.3.3,所有 firebase 库也更新到最新版本。我的问题是应用程序在启动并显示以下日志时崩溃。如何解决?非常感谢帮助。提前致谢

2020-03-17 15:49:00.676 16943-16943/? E/Zygote: isWhitelistProcess - Process is Whitelisted
2020-03-17 15:49:00.677 16943-16943/? E/Zygote: accessInfo : 1
2020-03-17 15:49:00.682 16943-16943/? I/com.mypackage.app: Late-enabling -Xcheck:jni
2020-03-17 15:49:00.739 16943-16973/? E/com.mypackage.app: Failed to send DDMS packet REAQ to debugger (-1 of 20): Broken pipe
2020-03-17 15:49:00.926 16943-16943/? I/com.mypackage.app: The ClassLoaderContext is a special shared library.
2020-03-17 15:49:02.102 16943-16943/com.mypackage.app I/MultiDex: VM with version 2.1.0 has multidex support
2020-03-17 15:49:02.102 16943-16943/com.mypackage.app I/MultiDex: Installing application
2020-03-17 15:49:02.102 16943-16943/com.mypackage.app I/MultiDex: VM has multidex support, MultiDex support library is disabled.
2020-03-17 15:49:02.110 16943-16943/com.mypackage.app D/AndroidRuntime: Shutting down VM
2020-03-17 15:49:02.113 16943-16943/com.mypackage.app E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mypackage.app, PID: 16943
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/R$string;
at com.google.android.gms.common.internal.StringResourceValueReader.<init>(Unknown Source:4)
at com.google.firebase.FirebaseOptions.fromResource(com.google.firebase:firebase-common@@19.3.0:156)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.3.0:244)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@19.3.0:51)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1940)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1915)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@19.3.0:45)
at android.app.ActivityThread.installProvider(ActivityThread.java:6742)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6289)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6204)
at android.app.ActivityThread.access$1200(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1785)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7050)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.R$string" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.kintapp.kint-p3Tr4wqxqUEo0V_RqsvUvA==/base.apk"],nativeLibraryDirectories=[/data/app/com.kintapp.kint-p3Tr4wqxqUEo0V_RqsvUvA==/lib/arm64, /data/app/com.kintapp.kint-p3Tr4wqxqUEo0V_RqsvUvA==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.google.android.gms.common.internal.StringResourceValueReader.<init>(Unknown Source:4) 
at com.google.firebase.FirebaseOptions.fromResource(com.google.firebase:firebase-common@@19.3.0:156) 
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.3.0:244) 
at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@19.3.0:51) 
at android.content.ContentProvider.attachInfo(ContentProvider.java:1940) 
at android.content.ContentProvider.attachInfo(ContentProvider.java:1915) 
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@19.3.0:45) 
at android.app.ActivityThread.installProvider(ActivityThread.java:6742) 
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6289) 
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6204) 
at android.app.ActivityThread.access$1200(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1785) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:214) 
at android.app.ActivityThread.main(ActivityThread.java:7050) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965) 
2020-03-17 15:49:02.140 16943-16943/com.kintapp.kint I/Process: Sending signal. PID: 16943 SIG: 9

enter image description here

最佳答案

如果您是realm用户,您可以将插件版本升级到最新稳定版。如果没有,你能提供你的 gradle 文件吗?

关于android - 如何修复 java.lang.NoClassDefFoundError : Failed resolution of: Lcom/google/android/gms/common/R$string in android studio 3. 6.1?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60719149/

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