Solution 1 :
Issues of that sort usually get fixed when you make a clean build then try again, if not try invalidating caches and restarting (File > Invalidate caches/restart)
Solution 2 :
At the end, the solution was to disable the breakpoints. Especifically the Java Exception breakpoints and Excepction breakpoints, also deleted all my breakpoints just in case. And I can debug again!
To delete breakpoints just go to Run>>View Breakpointsand and uncheck
I hope this helps other newbies like me
Problem :
Everything was working just fine, but then when I tried to debug again my app. It didn’t work and instead, I got the message,
“alternative source available for the class java.lang.class android studio”
I didn’t know what it meant. I clicked on disable, now I can’t debug anymore and it says the library Dalvik.annotation.optimization.FastNative is not found (java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available)
Does somebody know how to fix this issue? I can run the app, but as you know.. debugging is very useful, especially for someone like me. That has been working with android for just one month ago
I’m using Android Studio 3.6
This is the screen I get when I try to debug
Comments
Comment posted by Marco Espinoza
Thanks, just did as you said and I now I’m getting the next message Android Studio and Gradle are using different locations for the JDK. Android Studio: C:Program FilesAndroidAndroid Studiojre Gradle: C:Program FilesJavajdk1.8.0_241 Using different JDK locations might cause Gradle to spawn multiple daemons when executing tasks for Android Studio and other external processes. More info… Select a JDK from the File System Do not show this warning again
Comment posted by 92AlanC
Set the IDE’s JDK location to the same as the one set in your PATH environment variable. Since you’re using Windows, run this command to find your JDK location:
Comment posted by Marco Espinoza
I just solved and posted the answer, thanks a lot for your kind help
Comment posted by Benjamin Kershner
It might be helpful to add that you can re-enable the breakpoints after a successful rebuild. (or at least, I was able to).