java.lang.RuntimeException: Unable to start activity ComponentInfo{..*/com.unity3d.player.UnityPlayerNativeActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2247)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2297)
at android.app.ActivityThread.access$700(ActivityThread.java:152)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1282)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5328)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.unity3d.player.g.a(Unknown Source)
at com.unity3d.player.g.b(Unknown Source)
at com.unity3d.player.UnityPlayer.resume(Unknown Source)
at com.unity3d.player.UnityPlayer.a(Unknown Source)
at com.unity3d.player.UnityPlayer.init(Unknown Source)
at com.unity3d.player.UnityPlayerNativeActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:5250)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
… 11 more
java.lang.NullPointerException
at com.unity3d.player.g.a(Unknown Source)
at com.unity3d.player.g.b(Unknown Source)
at com.unity3d.player.UnityPlayer.resume(Unknown Source)
at com.unity3d.player.UnityPlayer.a(Unknown Source)
at com.unity3d.player.UnityPlayer.init(Unknown Source)
at com.unity3d.player.UnityPlayerNativeActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:5250)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2297)
at android.app.ActivityThread.access$700(ActivityThread.java:152)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1282)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5328)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
On some android devices, app can not launch. And I can find out What’s the problem on the bug report, does anyone know it?
Are you using some plugins in your project? Have you edited your AndroidManifest.xml? Are you launching your game from other Android app?
Also did you remove your package name from the log?
Unable to start activity ComponentInfo{..*/com.unity3d.player.UnityPlayerNativeActivity}
I think this is not the manifest problem. because my game can run well on most of the devices.
I also have the similar issue with few devices:
Samsung Galaxy S, Samsung Galaxy Mini, Samsung Galaxy Y, Alcatel OT-990.
The game runs fine on at least 40 other devices, some of which are ARMv6 based.
The game runs fine on the crashing devices when manually transferred from Unity using usb cable.
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.mycompany.mygame/com.prime31.UnityPlayerActivity}: java.lang.ClassNotFoundException: com.prime31.UnityPlayerActivity in loader dalvik.system.PathClassLoader[/data/app/com.mycompany.mygame-1.apk]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.prime31.UnityPlayerActivity in loader dalvik.system.PathClassLoader[/data/app/com.mycompany.mygame-1.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
Can anybody help?
I also have this issue ,add android:launchMode=“singleinstance” to your customActivity in AndroidManifest.xml file. That work for me.
I hope it can help you