3

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

1 Answer 1

4

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.
Sign up to request clarification or add additional context in comments.

8 Comments

It has the standard "public void onCreate(Bundle savedInstanceState)" constructor. I commented out all the code except for the "super" and it still fails.
Sorry. My mind was miles away. I have no constructor defined so I assume it is using the default one.
@theblitz: Can you create a short but complete program which demonstrates the problem (as close as possible in Android)?
Solved! Seems that my class had been changed to abstract when I was playing around with the interfaces it implements. Grrrr.
@theblitz Great Comment, Helpful a lot.. please post it as answer and accept that .. cause that will be the correct solution for the same.. not the current one..
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.