Unity Google广告:java.lang.Error:致命异常

时间:2019-07-02 17:22:44

标签: c# unity3d admob unityads

我刚刚从用户那里收到了这个错误,该游戏仅在从Play商店安装并首次单击打开按钮时崩溃,但是如果我在崩溃后打开游戏,则正常。另外,如果我将apk放在设备上并安装,则正常工作

在我将Google移动广告从3.16升级到3.18之后发生

团结2018.3.10 Google Mobile Ads Unity插件v3.18 Unity获利3.1.0

log:

06-30 21:38:35.316 16300 16300 E AndroidRuntime:致命异常:main 06-30 21:38:35.316 16300 16300 E Android Runtime:进程:xxxxxxx PID:16300 06-30 21:38:35.316 16300 16300 E AndroidRuntime:java.lang.Error:FATAL EXCEPTION [main] 06-30 21:38:35.316 16300 16300 E Android运行时: 06-30 21:38:35.316 16300 16300 E AndroidRuntime:由以下原因引起:java.lang.RuntimeException:无法实例化接收器com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver:java.lang.ClassNotFoundException:未找到类“路径上的com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver”:DexPathList [[zip文件“ /data/app/xxxxxxx/base.apk”,zip文件“ /data/app/xxxxxxx/split_config.arm64_v8a.apk”, zip文件“ /data/app/xxxxxxx/split_config.en.apk”、zip文件“ /data/app/xxxxxxx/split_config.xxhdpi.apk”],nativeLibraryDirectories=[/data/app/xxxxxxx/lib/arm64,/数据/app/xxxxxxx/base.apk!/lib/arm64-v8a,/data/app/xxxxxxx/split_config.arm64_v8a.apk!/lib/arm64-v8a,/data/app/xxxxxxx/split_config.en.apk! /lib/arm64-v8a、/data/app/xxxxxxx/split_config.xxhdpi.apk!/lib/arm64-v8a、/system/lib64、/vendor/lib64]]] 06-30 21:38:35.316 16300 16300 E AndroidRuntime:位于android.app.ActivityThread.handleReceiver(ActivityThread.java:3081) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在android.app.ActivityThread.-wrap18(ActivityThread.java) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1602) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:at android.os.Handler.dispatchMessage(Handler.java:102) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:at android.os.Looper.loop(Looper.java:173) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:位于android.app.ActivityThread.main(ActivityThread.java:6523) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:at java.lang.reflect.Method.invoke(本机方法) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:938) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:828) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:由以下原因引起:java.lang.ClassNotFoundException:在路径:DexPathList [[zip file //]上找不到类“ com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver” data / app / xxxxxxx / base.apk”,zip文件“ /data/app/xxxxxxx/split_config.arm64_v8a.apk”、zip文件“ /data/app/xxxxxxx/split_config.en.apk”、zip文件“ / data” /app/xxxxxxx/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/xxxxxxx/lib/arm64,/data/app/xxxxxxx/base.apk!/lib/arm64-v8a,/ data / app / xxxxxxx / split_config.arm64_v8a.apk!/lib/arm64-v8a、/data/app/xxxxxxx/split_config.en.apk!/lib/arm64-v8a、/data/app/xxxxxxx/split_config.xxhdpi.apk!/ lib / arm64-v8a,/ system / lib64,/ vendor / lib64]] 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:at java.lang.ClassLoader.loadClass(ClassLoader.java:380) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:at java.lang.ClassLoader.loadClass(ClassLoader.java:312) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在android.app.ActivityThread.handleReceiver(ActivityThread.java:3076) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:...还有8个 06-30 21:38:35.316 16300 16300 E AndroidRuntime:禁止:java.io.IOException:找不到dex位置/data/app/xxxxxxx/split_config.arm64_v8a.apk的原始dex文件 06-30 21:38:35.316 16300 16300 E AndroidRuntime:at dalvik.system.DexFile.openDexFileNative(本机方法) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在dalvik.system.DexFile.openDexFile(DexFile.java:373) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在dalvik.system.DexFile。(DexFile.java:113) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在dalvik.system.DexFile。(DexFile.java:78) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在dalvik.system.DexPathList.loadDexFile(DexPathList.java:359) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在dalvik.system.DexPathList.makeElements(DexPathList.java:323) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在dalvik.system.DexPathList.makeDexElements(DexPathList.java:263) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在dalvik.system.DexPathList。(DexPathList.java:126) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在dalvik.system.BaseDexClassLoader。(BaseDexClassLoader.java:48) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在dalvik.system.PathClassLoader。(PathClassLoader.java:64) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:46) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:58) 06-30 21:38:35.316 16300 16300 E AndroidRuntime:在android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:520) 06-30 21:38:35.317 16300 16300 E AndroidRuntime:at android.app.LoadedApk.getClassLoader(LoadedApk.java:553) 06-30 21:38:35.317 16300 16300 E AndroidRuntime:at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1925) 06-30 21:38:35.317 16300 16300 E AndroidRuntime:at android.app.LoadedApk.getResources(LoadedApk.java:766) 06-30 21:38:35.317 16300 16300 E AndroidRuntime:at android.app.ContextImpl。(ContextImpl.java:2074) 06-30 21:38:35.317 16300 16300 E AndroidRuntime:at android.app.ContextImpl.createAppContext(ContextImpl.java:2019) 06-30 21:38:35.317 16300 16300 E AndroidRuntime:at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5617) 06-30 21:38:35.317 16300 16300 E AndroidRuntime:位于android.app.ActivityThread.-wrap2(ActivityThread.java) 06-30 21:38:35.317 16300 16300 E AndroidRuntime:at android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1577) 06-30 21:38:35.317 16300 16300 E AndroidRuntime:...还有6个 06-30 21:38:35.317 16300 16300 E AndroidRuntime:禁止:java.io.IOException:找不到dex位置/data/app/xxxxxxx/split_config.en.apk的原始dex文件

1 个答案:

答案 0 :(得分:0)

对于任何一个遇到相同错误的人,请使用自定义gradle并实现这两个库:

实现'com.google.android.gms:play-services-measurement:17.0.0' 实施'com.google.android.gms:play-services-measurement-sdk:17.0.0'