Why the app crashes on launch
complete
KOBASHI Go -
I'm developing an Android app for UnrealEngine.
I tried to implement GameAnalytics with only Blueprint in Android application.
However, when I install the apk built by Shipping on my smartphone and start it up, it crashes.
The reason for the crash in adb logcat is displayed as follows.
advice please.
GameAnalytics Version 5.3.1
EngineVersion 5.1.1
Android Version 8.0.0
Referred procedure https://www.youtube.com/embed/WqDnJE8l3rw
06-10 15:03:05.962 30807 30807 E AndroidRuntime: FATAL EXCEPTION: main
06-10 15:03:05.962 30807 30807 E AndroidRuntime: Process: jp.example.GameAnalyticsTest, PID: 30807
06-10 15:03:05.962 30807 30807 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate application com.epicgames.unreal.GameApplication: java.lang.ClassNotFoundException: Didn't find class "com.epicgames.unreal.GameApplication" on path: DexPathList[[zip file "/data/app/jp.example.GameAnalyticsTest-WHGe8_vnygQGSCNJq2bHpA==/base.apk"],nativeLibraryDirectories=[/data/app/jp.example.GameAnalyticsTest-WHGe8_vnygQGSCNJq2bHpA==/lib/arm64, /system/lib64, /system/vendor/lib64]]
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.app.LoadedApk.makeApplication(LoadedApk.java:971)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5796)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.app.ActivityThread.-wrap1(Unknown Source:0)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1666)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.os.Looper.loop(Looper.java:251)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6572)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.epicgames.unreal.GameApplication" on path: DexPathList[[zip file "/data/app/jp.example.GameAnalyticsTest-WHGe8_vnygQGSCNJq2bHpA==/base.apk"],nativeLibraryDirectories=[/data/app/jp.example.GameAnalyticsTest-WHGe8_vnygQGSCNJq2bHpA==/lib/arm64, /system/lib64, /system/vendor/lib64]]
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.app.Instrumentation.newApplication(Instrumentation.java:1087)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.app.LoadedApk.makeApplication(LoadedApk.java:965)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: ... 9 more
06-10 15:03:05.962 30807 30807 E AndroidRuntime: Suppressed: java.io.IOException: Failed to open dex files from /data/app/jp.example.GameAnalyticsTest-WHGe8_vnygQGSCNJq2bHpA==/base.apk because: Failure to verify dex file '/data/app/jp.example.GameAnalyticsTest-WHGe8_vnygQGSCNJq2bHpA==/base.apk': Bad method handle type 7
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at dalvik.system.DexFile.openDexFileNative(Native Method)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at dalvik.system.DexFile.openDexFile(DexFile.java:353)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at dalvik.system.DexFile.<init>(DexFile.java:100)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at dalvik.system.DexFile.<init>(DexFile.java:74)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at dalvik.system.DexPathList.loadDexFile(DexPathList.java:374)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at dalvik.system.DexPathList.makeDexElements(DexPathList.java:337)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at dalvik.system.DexPathList.<init>(DexPathList.java:157)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:69)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:36)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:676)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.app.LoadedApk.getClassLoader(LoadedApk.java:709)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.app.LoadedApk.getResources(LoadedApk.java:936)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.app.ContextImpl.createAppContext(ContextImpl.java:2242)
06-10 15:03:05.962 30807 30807 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5703)
Nicky Toma
complete
Nicky Toma
under review
KOBASHI Go -
Solved by adding the following to GameAnalytics_APL.xml
<buildGradleAdditions>
<insert>
--------------------------------------------------
android {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
--------------------------------------------------