java.lang.RuntimeException

Unable to instantiate service com.example.com.intentservice_00.MyIntentService: java.lang.InstantiationException: java.lang.Class<com.example.com.intentservice_00.MyIntentService> has no zero argument constructor

Samebug tips1

This happens when you try to instantiate a class that can't be instantiated, either because the class object is abstract, an interface, an array class, a primitive type, void, or because the class has no nullary constructor.


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web844

  • via Stack Overflow by user2121
    ,
  • via Unknown by Unknown author,
  • via Unknown by Unknown author,
  • Stack trace

    • java.lang.RuntimeException: Unable to instantiate service com.example.com.intentservice_00.MyIntentService: java.lang.InstantiationException: java.lang.Class<com.example.com.intentservice_00.MyIntentService> has no zero argument constructor at android.app.ActivityThread.handleCreateService(ActivityThread.java:3778) at android.app.ActivityThread.access$2100(ActivityThread.java:223) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1885) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7231) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: java.lang.InstantiationException: java.lang.Class<com.example.com.intentservice_00.MyIntentService> has no zero argument constructor at java.lang.Class.newInstance(Native Method) at android.app.ActivityThread.handleCreateService(ActivityThread.java:3775)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    Unknown UserUnknown User
    178 times, last one
    filpgamefilpgame
    8 times, last one
    brunosatrianibrunosatriani
    70 times, last one
    Diogo JaymDiogo Jaym
    2 times, last one
    39 more bugmates