in the last few days, my Android Game is throwing a ClassNotFoundException. There is no classname in the Exception, so i don’t have ideas for solving the bug. The user who is testing the game is in another country, so I don’t have physical access to the device.
Hmm, not sure what could be the problem. It would be good if you could reproduce it. Do you know when it happens? On startup? Or while playing? Or when a specific thing happens?
When a user play the game for the first time after install the game from Google Play, the game crashes. If the user open the game for the second time, the game works without problem.
To Reproduce:
Uninstall the current version of the game from the test device.
Install the game using the Google Play (the game is in alpha state, is still not public).
Start the game clicking in the game icon.
The game crashes, the android crash report window appears.
Expected behavior: The game should start smoothly.
Logs: Using adb logcat, the following message appears:
09-15 21:20:33.531 28913 28947 E defold.sound: App is missing the READ_PHONE_STATE permission. Audio will continue while phone call is active.
09-15 21:20:34.911 28913 28913 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate receiver com.defold.adtruth.InstallReceiver: java.lang.ClassNotFoundException: Didn’t find class “com.defold.adtruth.InstallReceiver” on path: DexPathList[[zip file “/data/app/com.heizhu.brokenskulls-1/base.apk”],nativeLibraryDirectories=[/data/app/com.heizhu.brokenskulls-1/lib/arm64, /data/app/com.heizhu.brokenskulls-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]
09-15 21:20:34.911 28913 28913 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn’t find class “com.defold.adtruth.InstallReceiver” on path: DexPathList[[zip file “/data/app/com.heizhu.brokenskulls-1/base.apk”],nativeLibraryDirectories=[/data/app/com.heizhu.brokenskulls-1/lib/arm64, /data/app/com.heizhu.brokenskulls-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]
09-15 21:20:34.911 28913 28913 E AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: com.defold.adtruth.InstallReceiver
I can reproduce the bug now, so if you need more info just ask me.
Woah! The com.defold.adtruth namespace was used by King games to handle install attribution. It has been gone from the engine for a very long time. I’m a bit confused since you’re using a new editor. Is the apk that is crashing actually built using that version of the editor?
Are you using a custom manifest file? If that is the case then please make sure to update it to match the up to date manifest in builtins/manifest/android