Question

I am getting this error. Problem is that the "caused by" clause doesnt seem to give any more information.

12-25 19:34:05.050: E/AndroidRuntime(28888): Uncaught handler: thread main exiting due to uncaught exception
12-25 19:34:05.070: E/AndroidRuntime(28888): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{il.co.anykey.games.yaniv.pro/ui.YanivMultiPlayerClientActivity}: java.lang.InstantiationException: ui.YanivMultiPlayerClientActivity
12-25 19:34:05.070: E/AndroidRuntime(28888):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2424)
12-25 19:34:05.070: E/AndroidRuntime(28888):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2519)
12-25 19:34:05.070: E/AndroidRuntime(28888):    at android.app.ActivityThread.access$2200(ActivityThread.java:123)
12-25 19:34:05.070: E/AndroidRuntime(28888):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1870)
12-25 19:34:05.070: E/AndroidRuntime(28888):    at android.os.Handler.dispatchMessage(Handler.java:99)
12-25 19:34:05.070: E/AndroidRuntime(28888):    at android.os.Looper.loop(Looper.java:123)
12-25 19:34:05.070: E/AndroidRuntime(28888):    at android.app.ActivityThread.main(ActivityThread.java:4370)
12-25 19:34:05.070: E/AndroidRuntime(28888):    at java.lang.reflect.Method.invokeNative(Native Method)
12-25 19:34:05.070: E/AndroidRuntime(28888):    at java.lang.reflect.Method.invoke(Method.java:521)
12-25 19:34:05.070: E/AndroidRuntime(28888):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
12-25 19:34:05.070: E/AndroidRuntime(28888):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
12-25 19:34:05.070: E/AndroidRuntime(28888):    at dalvik.system.NativeStart.main(Native Method)
12-25 19:34:05.070: E/AndroidRuntime(28888): Caused by: java.lang.InstantiationException: ui.YanivMultiPlayerClientActivity
12-25 19:34:05.070: E/AndroidRuntime(28888):    at java.lang.Class.newInstanceImpl(Native Method)
12-25 19:34:05.070: E/AndroidRuntime(28888):    at java.lang.Class.newInstance(Class.java:1479)
12-25 19:34:05.070: E/AndroidRuntime(28888):    at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
12-25 19:34:05.070: E/AndroidRuntime(28888):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
12-25 19:34:05.070: E/AndroidRuntime(28888):    ... 11 more
12-25 19:34:05.110: E/SemcCheckin(28888): Get crash dump level : java.io.FileNotFoundException: /data/semc-checkin/crashdump
Was it helpful?

Solution

Does your ui.YanivMultiPlayerClientActivity have a public parameterless constructor? It looks like it's failing to instantiate it. Reasons that might be the case:

  • The class could be abstract (as it turns out is the case)
  • The class could have no parameterless constructors
  • A parameterless constructor could exist, but not be public
  • The constructor could be throwing an exception (which I'd expect to be included as a further cause)
  • The class could be an inner class that was not declared static.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top