gpt4 book ai didi

java - 无法实例化应用程序 com.google.android.gms.common.app.GmsApplication

转载 作者:太空狗 更新时间:2023-10-29 14:43:28 25 4
gpt4 key购买 nike

我在使用 Google Play 服务版本 100884030 的 Android 4.4(在某些设备上)运行我的应用程序时遇到问题。我收到以下错误:

FATAL EXCEPTION: main
Process: com.google.android.gms, PID: 8678
java.lang.RuntimeException: Unable to instantiate application com.google.android.gms.common.app.GmsApplication: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.app.GmsApplication" on path: DexPathList[[zip file "/system/framework/com.android.media.remotedisplay.jar", zip file "/system/framework/com.android.location.provider.jar", zip file "/system/framework/com.google.android.ble.jar"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:507)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4301)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
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:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.app.GmsApplication" on path: DexPathList[[zip file "/system/framework/com.android.media.remotedisplay.jar", zip file "/system/framework/com.android.location.provider.jar", zip file "/system/framework/com.google.android.ble.jar"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at android.app.Instrumentation.newApplication(Instrumentation.java:975)
at android.app.LoadedApk.makeApplication(LoadedApk.java:502)
... 11 more

我的 Gradle 设置:

compileSdkVersion 25
buildToolsVersion "25.0.2"
minSdkVersion 14
targetSdkVersion 22
....
compile 'com.google.android.gms:play-services-analytics:10.2.1'
compile 'com.google.android.gms:play-services-ads:10.2.1'

所以你看到问题是什么了吗?我该如何解决?

谢谢!!!

最佳答案

我在 Firebase 测试实验室运行该应用程序时遇到了同样的问题,但几分钟后运行测试后问题就解决了。所以,我认为这与应用程序本身无关,而与测试基础设施有关。

关于java - 无法实例化应用程序 com.google.android.gms.common.app.GmsApplication,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44000606/

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