java.lang.RuntimeException

Unable to instantiate receiver com.mymusicplayer.manjunath.mymusicplayer.MainActivity$switchButtonListener: java.lang.InstantiationException: class com.mymusicplayer.manjunath.mymusicplayer.MainActivity$switchButtonListener has no zero argument constructor

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

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

Solutions on the web43071

  • Unable to instantiate receiver com.mymusicplayer.manjunath.mymusicplayer.MainActivity$switchButtonListener: java.lang.InstantiationException: class com.mymusicplayer.manjunath.mymusicplayer.MainActivity$switchButtonListener has no zero argument constructor
  • Unable to instantiate receiver com.example.krishan.timertest.MyService$AlarmReceiver: java.lang.InstantiationException: class com.example.krishan.timertest.MyService$AlarmReceiver has no zero argument constructor
  • Unable to instantiate receiver com.example.carlos.recordatorio01.MainActivity$Receiver: java.lang.InstantiationException: class com.example.carlos.recordatorio01.MainActivity$Receiver has no zero argument constructor
  • Stack trace

    • java.lang.RuntimeException: Unable to instantiate receiver com.mymusicplayer.manjunath.mymusicplayer.MainActivity$switchButtonListener: java.lang.InstantiationException: class com.mymusicplayer.manjunath.mymusicplayer.MainActivity$switchButtonListener has no zero argument constructor at android.app.ActivityThread.handleReceiver(ActivityThread.java:2620) at android.app.ActivityThread.access$1700(ActivityThread.java:155) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1394) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5343) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700) Caused by: java.lang.InstantiationException: class com.mymusicplayer.manjunath.mymusicplayer.MainActivity$switchButtonListener has no zero argument constructor at java.lang.Class.newInstance(Class.java:1597) at android.app.ActivityThread.handleReceiver(ActivityThread.java:2615) ... 9 more Caused by: java.lang.NoSuchMethodException: <init> [] at java.lang.Class.getConstructor(Class.java:531) at java.lang.Class.getDeclaredConstructor(Class.java:510) at java.lang.Class.newInstance(Class.java:1595) ... 10 more

    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

    12 times, 1 year ago
    10 times, 1 year ago
    2 times, 10 months ago
    Unknown user
    Once, 1 year ago
    5 times, 39 minutes ago
    45 more bugmates