- Home /
Android build crashes on start up.
Hi,
My colleague and I developed an Android app to complement our PC program. We developed, tested and deployed the app without any problems. Also after receiving user feedback we fixed a few issues and deployed several times, also without any problems. (The app is called "Palette MOVE" and can be found on Google Play, should anyone be interested.)
Now however, a few weeks later we suddenly found that we can't build a working app anymore. To be precise, we can compile and build the apk file, but if we deploy it to an Android device or use the "build and run" feature within Unity the app is installed on the device, but crashes on start up. Before the splash screen even shows, we get the message: "Unfortunately, Palette MOVE has stopped."
We are both using Unity 5 Pro, Version 5.3.4f1. The app also makes use of the Google Cardboard SDK for Unity, Version 0.6. We have tried everything we can think of to get it working again, but always encounter this same error. We deinstalled and reinstalled Unity, we deleted the Unity project on our PC's and tried different versions from our source control, versions prior to the initial deployment which definitely worked before, but still we get the same error.
If we however change the following line in the AnroidManifest.xml, located in: Assets\Plugins\Android:
<activity android:name="com.google.unity.GoogleUnityActivity" ...
to the standard
<activity android:name="com.unity3d.player.UnityPlayerActivity" ...
the app will load again. However this doesn't solve our problem, as in this case the Cardboard VR functionality doesn't work anymore.
Can someone please help us with this issue. We are absolutely stumped as what could be causing it and at the moment we can't update our app anymore. We would also be happy to provide any further information.
You need to look at the error messages in Logcat... Surely there must be some information there before the app force closes?
How did you solve this issue?
I got the same problem too, the difference was I used GoogleVR1.40 ins$$anonymous$$d since Google Cardboard SD$$anonymous$$ version 0.6 has no longer been available. Your help will be much appreciated!
Hello ira-jule,
It's quite some time ago, but I think we solved the issue by porting to a newer Unity version and a newer Cardboard version. Also as mentioned in one of the comments below, the "lib" folder which was located in "Assets\Plugins\Android" had not found it's way into our source control.
Answer by cmbellman · May 12, 2016 at 03:10 PM
Yes... java.lang.ClassNotFoundException: Didn't find class "com.google.unity.GoogleUnityActivity"
That's your startup activity, right? So you need to check your plugin why the GoogleUnityActivity class isn't included in the build.
Hi,
Thank you for your answer. After upgrading to the new Google Cardboard Version (V 0.8), I've finally found the cause for our error. It seems that the "lib" folder located in "Assets\Plugins\Android" somehow got deleted. Sadly this folder never found it's way into our source control, unlike all the other folders required for this project. I could really kick myself for this stupid error. Anyway, everything is working again now. Thanks a lot for your support.
Answer by Ashiash · May 12, 2016 at 02:52 PM
Hi. This is what logcat ist telling me. Does this help you in any way?
E/AndroidRuntime( 8709): FATAL EXCEPTION: main
E/AndroidRuntime( 8709): Process: com.palettecad.palettemove, PID: 8709
E/AndroidRuntime( 8709): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.palettecad.palettemove/com.google.unity.GoogleUnityActivity}: java.lang.ClassNotFoundException: Didn't find class "com.google.unity.GoogleUnityActivity" on path: DexPathList[[zip file "/data/app/com.palettecad.palettemove-1/base.apk"],nativeLibraryDirectories=[/data/app/com.palettecad.palettemove-1/lib/arm, /vendor/lib, /system/lib]]
E/AndroidRuntime( 8709): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2322)
E/AndroidRuntime( 8709): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2474)
E/AndroidRuntime( 8709): at android.app.ActivityThread.access$800(ActivityThread.java:144)
E/AndroidRuntime( 8709): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1359)
E/AndroidRuntime( 8709): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 8709): at android.os.Looper.loop(Looper.java:155)
E/AndroidRuntime( 8709): at android.app.ActivityThread.main(ActivityThread.java:5696)
E/AndroidRuntime( 8709): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 8709): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 8709): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1028)
E/AndroidRuntime( 8709): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
E/AndroidRuntime( 8709): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.unity.GoogleUnityActivity" on path: DexPathList[[zip file "/data/app/com.palettecad.palettemove-1/base.apk"],nativeLibraryDirectories=[/data/app/com.palettecad.palettemove-1/lib/arm, /vendor/lib, /system/lib]]
E/AndroidRuntime( 8709): atdalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
E/AndroidRuntime( 8709): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
E/AndroidRuntime( 8709): at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
E/AndroidRuntime( 8709): at android.app.Instrumentation.newActivity(Instrumentation.java:1083)
E/AndroidRuntime( 8709): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2312)
E/AndroidRuntime( 8709): ... 10 more
E/AndroidRuntime( 8709): Suppressed: java.lang.ClassNotFoundException: com.google.unity.GoogleUnityActivity
E/AndroidRuntime( 8709): at java.lang.Class.classForName(Native Method)
E/AndroidRuntime( 8709): at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
E/AndroidRuntime( 8709): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
E/AndroidRuntime( 8709): at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
E/AndroidRuntime( 8709): ... 13 more
E/AndroidRuntime( 8709): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
E/ActivityManager( 652): App crashed! Process: com.palettecad.palettemove
W/ActivityManager( 652): Force finishing activity com.palettecad.palettemove/com.google.unity.GoogleUnityActivity
D/HtcFooter( 1095): layerDrawableIndex = 4
Your answer
Follow this Question
Related Questions
Is it possible to register android application in AndroidManifest.xml? 0 Answers
Using CustomUnityPlayerActivity, which inherits from UnityPlayerActivity, will cause problems. 0 Answers
Android app opens "App Info" instead of launching app 0 Answers