Orest
Orest

Reputation: 6748

How to fix transformClassesWithInstantRunForDebug in gradle

I have Android application which was working fine but few hours ago it started showing me error on Run 'app' click in Android Studio:

Error:Execution failed for task ':app:transformClassesWithInstantRunForDebug'.
> org.objectweb.asm.tree.analysis.AnalyzerException: Execution can fall off end of the code

If I build app from console like gradle assembleRelease everything works fine.

So my question is how to fix this, what could cause this problem. It drives me crazy, because I can't start my app only from Android Studio.

Btw: I already tried to google it and a lot of answers about multidex problem but I guess it's not an option in my case.

Upvotes: 6

Views: 6689

Answers (1)

Gibolt
Gibolt

Reputation: 47257

Delete build dir

Try deleting the contents of your build directory, and then rebuilding.

appName/build and/or appName/app/build

Alternatively, clean your build

A less brute force option to try is to clean the build.

Build -> Clean Project or Build -> Rebuild Project

Upvotes: 6

Related Questions