1

Android Studio Version: 3.1.2

I am not able to disable the instant run checkbox in the android studio.

Tried to disable from the below path

File → Settings → Build, Execution, Deployment → Instant Run and uncheck Enable Instant Run( the checkbox is grey out and I'm unable to click on it).

I tried uninstalling the android studio also. Please help me out here.

DDM
  • 113
  • 1
  • 17

2 Answers2

1

Disable automatic activity restart

Open the Settings or Preferences dialog: On Windows or Linux, select File > Settings from the menu bar. On Mac OSX, select Android Studio > Preferences from the menu bar.

Navigate to Build, Execution, Deployment > Instant Run.

Uncheck the box next to Restart activity on code changes.

Hitesh Kushwah
  • 1,351
  • 13
  • 23
1

It's tied to the app's gradle. https://developer.android.com/studio/run/#instant-run

I'm assuming you already used it once for the app. Try uninstalling the app from the target device/emulator (and unplugging/stopping it) then go to File-> Invalidate Caches and Restart. Then see if it still doesn't let you.

EDIT: Make sure gradle files are updated and the versions match.

Mr.Drew
  • 939
  • 2
  • 9
  • 30
  • Already tried this. when i try to sync i'm getting this error "Gradle sync failed: Failed to notify project evaluation listener." For correcting above error I need to disable instant run. Please help me. – DDM May 21 '18 at 09:00
  • Can you post your log report that shows what part of the sync failed? – Mr.Drew May 21 '18 at 09:27
  • 1
    Thanks for helping. There is an issue with my gradle files. I have changed the version and did sync, it worked. – DDM May 21 '18 at 12:06