# java.lang.RuntimeException: Unable to start activity

**URL:** <https://discussions.unity.com/t/java-lang-runtimeexception-unable-to-start-activity/510766>\
**Category:** Mobile\
**Tags:** Android\
**Created:** [July 26, 2013, 2:18pm UTC](https://discussions.unity.com/t/java-lang-runtimeexception-unable-to-start-activity/510766 "2013-07-26T14:18:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felix\_Liu](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@Felix\_Liu](https://discussions.unity.com/u/Felix_Liu)\
**Post date:** [July 26, 2013, 2:18pm UTC](https://discussions.unity.com/t/java-lang-runtimeexception-unable-to-start-activity/510766/1 "2013-07-26T14:18:45Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Felix\_Liu](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@Felix\_Liu](https://discussions.unity.com/u/Felix_Liu)\
**Post date:** [July 26, 2013, 2:22pm UTC](https://discussions.unity.com/t/java-lang-runtimeexception-unable-to-start-activity/510766/2 "2013-07-26T14:22:25Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Agent\_007](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@Agent\_007](https://discussions.unity.com/u/Agent_007)\
**Post date:** [July 27, 2013, 1:43pm UTC](https://discussions.unity.com/t/java-lang-runtimeexception-unable-to-start-activity/510766/3 "2013-07-27T13:43:45Z")

</div>

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}_

---

<div class="post-metadata">

**Author:** ![Felix\_Liu](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@Felix\_Liu](https://discussions.unity.com/u/Felix_Liu)\
**Post date:** [August 4, 2013, 4:01pm UTC](https://discussions.unity.com/t/java-lang-runtimeexception-unable-to-start-activity/510766/4 "2013-08-04T16:01:58Z")

</div>

I think this is not the manifest problem. because my game can run well on most of the devices.

---

<div class="post-metadata">

**Author:** ![nikolic](https://avatars.discourse-cdn.com/v4/letter/n/e5b9ba/32.png) [@nikolic](https://discussions.unity.com/u/nikolic)\
**Post date:** [August 30, 2013, 8:57am UTC](https://discussions.unity.com/t/java-lang-runtimeexception-unable-to-start-activity/510766/5 "2013-08-30T08:57:10Z")

</div>

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.

```auto
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?

---

<div class="post-metadata">

**Author:** ![BooooG](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@BooooG](https://discussions.unity.com/u/BooooG)\
**Post date:** [September 4, 2013, 11:05am UTC](https://discussions.unity.com/t/java-lang-runtimeexception-unable-to-start-activity/510766/6 "2013-09-04T11:05:42Z")

</div>

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
