I didn’t think about it before I heard it..
Error screenshot
error message
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.imoocmusicdemo, PID: 14631
java.lang.IllegalStateException: Could not execute method for android:onClick
at android.view.View$DeclaredOnClickListener.onClick(View.java:5634)
at android.view.View.performClick(View.java:6597)
at android.view.View.performClickInternal(View.java:6574)
at android.view.View.access$3100(View.java:778)
at android.view.View$PerformClick.run(View.java:25885)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at android.view.View$DeclaredOnClickListener.onClick(View.java:5629)
at android.view.View.performClick(View.java:6597)
at android.view.View.performClickInternal(View.java:6574)
at android.view.View.access$3100(View.java:778)
at android.view.View$PerformClick.run(View.java:25885)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.imoocmusicdemo/com.example.imoocmusicdemo.activitys.RegisterActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2005)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1673)
at android.app.Activity.startActivityForResult(Activity.java:4586)
at android.app.Activity.startActivityForResult(Activity.java:4544)
at android.app.Activity.startActivity(Activity.java:4905)
at android.app.Activity.startActivity(Activity.java:4873)
at com.example.imoocmusicdemo.activitys.LoginActivity.onRegisterClick(LoginActivity.java:40)
at java.lang.reflect.Method.invoke(Native Method)
at android.view.View$DeclaredOnClickListener.onClick(View.java:5629)
at android.view.View.performClick(View.java:6597)
at android.view.View.performClickInternal(View.java:6574)
at android.view.View.access$3100(View.java:778)
at android.view.View$PerformClick.run(View.java:25885)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I/Process: Sending signal. PID: 14631 SIG: 9
Application terminated.
Cause of error
Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.imoocmusicdemo/com.example.imoocmusicdemo.activitys.RegisterActivity}; have you declared this activity in your AndroidManifest.xml?
resolvent: AndroidManifest.xml Add registeractivity
Read More:
- Android error java.lang.IllegalStateException : System services not available to Activities before onC
- Caused by: java.lang.IllegalStateException: Ambiguou There is already ‘XXXXXXController‘ bean method
- java.lang.IllegalStateException Exception: cause analysis and solution
- java.lang.IllegalStateException: ArrayAdapter requires the resource ID to be a TextView
- Spring boot running appears java.lang.IllegalStateException : Failed to load ApplicationContext
- [unity] Android package error java.lang.ClassNotFoundException Did not find class com.unity3d . player.MainActivity
- java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed
- android Caused by: java.util.ConcurrentModificationException
- Idea start error: java.lang.IllegalStateException : failed to create a child event loop
- java.lang.IllegalStateException: Logback configuration error detected
- java.lang.IllegalStateException : unable to read meta data for class
- Android 9.0 APP Install Android 4.4 Error: classnotfoundexception
- java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @Context
- Android solution to the conflict of calling ontouch and onclick at the same time
- Android appears java.lang.NoClassDefFoundError A solution to the error
- Apache Groovy——java.lang.NoSuchMethodError: x.x.x: method <init>()V not found
- Error java.lang.IllegalArgumentException: Validation failed for query for method public abstract
- Error in idea compilation: java.lang.OutOfMemoryError Java heap space and java.lang.StackOverflowError
- Spock + powermock simulation static method reports an error java.lang.classcastexception
- Method threw ‘java.lang.NullPointerException‘ exception. Cannot evaluate com.sun.proxy.xxx