Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Solve: Error:Execution failed for task ':app:transformClassesWithInstantRunForDebug'

Tags:

java

android

The full error is this

Error:Execution failed for task ':app:transformClassesWithInstantRunForDebug'.

java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $

I made a small change to my project on Android Studio, tried to run it and it crashed my PC, it was completely frozen for a couple of minutes, first time this has happened while compiling on AS (I didn't use the ADB) when my PC restarts I get the error

Error:null value in entry: blameLogFolder=null

Results tell me to delete the .gradle foldier of my project, so I do that and when I run it again I get this new error.

I have no clue what's wrong or even how to fix it, and extra help online was no help.

Everything was working perfectly fine 10 minutes ago and now the project won't compile, I can't even make an apk.

like image 699
nothing Avatar asked Feb 12 '18 01:02

nothing


2 Answers

Go to

File->settings->build,execustion,deployment->instant run

then

Uncheck the "Enable instant run to hot swap code / resource changes on deploy(default enabled)"

like image 165
david jeyaseelan Avatar answered Oct 07 '22 17:10

david jeyaseelan


To solve this, go to File->"Invalidate Caches / Restart..." and clean your caches and restart Android Studio. Wait to rebuild gradle is finished. After go to Build->Clean Project and finally go to Build->Rebuild Project.

like image 15
Andrés R.C. Avatar answered Oct 07 '22 17:10

Andrés R.C.