java.lang.IllegalStateException: Could not execute method for android:onClick

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

,
via github.io by Unknown author

You need to setup a GlideModule before use Glide.

,

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.

Solutions on the web

via GitHub by btusca
, 1 year ago
Could not execute method for android:onClick
via GitHub by hassaanjamil
, 3 months ago
Could not execute method for android:onClick
via GitHub by danilorosso
, 1 year ago
Could not execute method for android:onClick
via Stack Overflow by kps2501
, 1 year ago
Could not execute method for android:onClick
via Stack Overflow by Zahraa Fatma
, 1 year ago
Could not execute method for android:onClick
java.lang.ClassNotFoundException: Didn't find class "org.apache.commons.mail.SimpleEmail" on path: DexPathList[[dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-support-annotations-23.4.0_d240637ab16909631b8e0522acd22a25d9696630-classes.dex", dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-internal_impl-23.4.0_af59f0bca6bcee7449190085fe52534aee83e2f1-classes.dex", dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-com.android.support-support-vector-drawable-23.4.0_bd8c75447dc30c698da5700ab2e0aefa2fe4fe35-classes.dex", dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-com.android.support-support-v4-23.4.0_3f1746aab7883e4aa141bfb0b148adeead28e570-classes.dex", dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-com.android.support-appcompat-v7-23.4.0_f3af541e04a191f70d73c09b1b309272e4406a2b-classes.dex", dex file "/data/data/contasts.jao.email/files/instant-run/dex/slice-com.android.support-animated-vector-drawable-23.4.0_241ea31a1f8c1e8e0741e2b1a365cddd6e9449c2-classes.dex"],nativeLibraryDirectories=[/data/app/contasts.jao.email-1/lib/arm, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader.findClass(IncrementalClassLoader.java:90)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at contasts.jao.email.MainActivity.mandarEmail(MainActivity.java:54)
at android.view.View.performClick(View.java:5201)
at android.view.View$PerformClick.run(View.java:21163)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)

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.