14

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.

nothing
  • 151
  • 2
  • 6

2 Answers2

20

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)"

  • 2
    This 100%. Instant run causes more problems than it's worth. – Nic Bell Apr 26 '19 at 09:44
  • 4
    In AndroidStudio 3.4.1 for Mac, the settings path is AndroidStudio > Preferences > Build,Execution,Deployment > InstantRun – Tony May 28 '19 at 21:31
14

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.

Andrés R.C.
  • 421
  • 2
  • 5