java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.test2/com.example.test2.activity_main}: java.lang.ClassNotFoundException: com.example.test2.activity_main

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

A required library class, SdkReceiver, is not loaded. Make sure your SDK classpath is configured correctly in the environment variable or use the -cp or -classpath option if running on the command line, to point to your SDK jar files.

,
via github.io by Unknown author

You need to setup a GlideModule before use Glide.

Solutions on the web

via Stack Overflow by adamsc
, 1 year ago
Unable to instantiate activity ComponentInfo{com.example.test2/com.example.test2.activity_main}: java.lang.ClassNotFoundException: com.example.test2.activity_main
via Stack Overflow by Unknown author, 2 years ago
Unable to start activity ComponentInfo{com.example.test2/com.example.test2.Jeu}: java.lang.ArrayIndexOutOfBoundsException: length=0; index=32
via Stack Overflow by Apoz
, 1 year ago
Unable to start activity ComponentInfo{com.example.test2/com.example.test2.MainActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class fragment
via GitHub by alexander-yakushev
, 5 months ago
Unable to instantiate activity ComponentInfo{test.crash/test.crash.SplashActivity}: java.lang.ClassNotFoundException: test.crash.SplashActivity
via Stack Overflow by Noctilux
, 2 years ago
Unable to instantiate activity ComponentInfo{hr.punctum.LociranjePonudaProizvoda/hr.punctum.LociranjePonudaProizvoda.ListaProizvoda}: java.lang.ClassNotFoundException: hr.punctum.LociranjePonudaProizvoda.ListaProizvoda
via Stack Overflow by Blake
, 2 years ago
Unable to instantiate activity ComponentInfo{com.example.android.networkusage/com.example.networkusage.NetworkActivity}: java.lang.ClassNotFoundException: com.example.networkusage.NetworkActivity
java.lang.ClassNotFoundException: com.example.test2.activity_main
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
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:786)

Users with the same issue

39 times, 1 month ago
Once, 2 months ago
17699 times, 3 months ago
9 times, 3 months ago
2 times, 4 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.