Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 927
Orest Avatar asked May 24 '16 17:05

Orest


1 Answers

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

like image 134
Gibolt Avatar answered Sep 21 '22 10:09

Gibolt