我在android中使用谷歌地图有一个小问题,我使用android studio开发应用程序,并且一直在使用谷歌地图API。当Android 9(未发布)时,我开始开发该应用。在发布android 9之后,我继续使用Android 8(带有模拟器)开发该应用程序。今天,我在手机上安装了该应用程序,他安装了Android 9,并且一切正常,只有当我尝试打开地图活动未加载并且按下按钮时,应用程序才会崩溃
一些解决此问题的技巧?
logcat:
2019-07-15 19:28:52.718 29711-29758/com.example.autentificare E/FirebaseCrash: Failed to initialize crash reporting
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzbvd;
at java.util.concurrent.FutureTask.report(FutureTask.java:123)
at java.util.concurrent.FutureTask.get(FutureTask.java:207)
at com.google.firebase.crash.zze.run(Unknown Source:8)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:459)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzbvd;
at com.google.android.gms.internal.zzdnb.<clinit>(Unknown Source:8)
at com.google.android.gms.internal.zzdnb.initialize(Unknown Source:0)
at com.google.firebase.crash.zzc.zzbpf(Unknown Source:2)
at com.google.firebase.crash.zzd.call(Unknown Source:2)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.internal.zzbvd" on path: DexPathList[[zip file "/data/app/com.example.autentificare-ltQ6-ffayKmKhD1ZY3VMoQ==/base.apk", zip file "/data/app/com.example.autentificare-ltQ6-ffayKmKhD1ZY3VMoQ==/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.autentificare-ltQ6-ffayKmKhD1ZY3VMoQ==/split_lib_resources_apk.apk", zip file "/data/app/com.example.autentificare-ltQ6-ffayKmKhD1ZY3VMoQ==/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.autentificare-ltQ6-ffayKmKhD1ZY3VMoQ==/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.autentificare-ltQ6-ffayKmKhD1ZY3VMoQ==/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.autentificare-ltQ6-ffayKmKhD1ZY3VMoQ==/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.autentificare-ltQ6-ffayKmKhD1ZY3VMoQ==/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.autentificare-ltQ6-ffayKmKhD1ZY3VMoQ==/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.autentificare-ltQ6-ffayKmKhD1ZY3VMoQ==/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.autentificare-ltQ6-ffayKmKhD1ZY3VMoQ==/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.autentificare-ltQ6-ffayKmKhD1ZY3VMoQ==/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.autentificare-ltQ6-ffayKmKhD1ZY3VMoQ==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.autentificare-ltQ6-ffayKmKhD1ZY3VMoQ==/lib/arm, /system/lib, /vendor/lib]]
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.internal.zzdnb.<clinit>(Unknown Source:8)
at com.google.android.gms.internal.zzdnb.initialize(Unknown Source:0)
at com.google.firebase.crash.zzc.zzbpf(Unknown Source:2)
at com.google.firebase.crash.zzd.call(Unknown Source:2)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Suppressed: java.io.IOException: No original dex files found for dex location (arm) /data/app/com.example.autentificare-ltQ6-ffayKmKhD1ZY3VMoQ==/split_lib_resources_apk.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:354)
at dalvik.system.DexFile.<init>(DexFile.java:101)
at dalvik.system.DexFile.<init>(DexFile.java:75)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:394)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:354)
at dalvik.system.DexPathList.<init>(DexPathList.java:164)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:74)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:74)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:40)
2019-07-15 19:28:52.722 29711-29758/com.example.autentificare E/FirebaseCrash: at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:766)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:849)
at android.app.LoadedApk.getResources(LoadedApk.java:1090)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2563)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6147)
at android.app.ActivityThread.access$1200(ActivityThread.java:240)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1797)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7097)
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:975)
2019-07-15 19:28:52.725 29711-29759/com.example.autentificare E/FirebaseCrash: Failed waiting for crash api to load.
java.lang.InterruptedException
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1063)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1352)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:278)
at com.google.firebase.crash.FirebaseCrash.zzboz(Unknown Source:6)
at com.google.firebase.crash.FirebaseCrash.zza(Unknown Source:0)
at com.google.firebase.crash.zza.run(Unknown Source:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)