This version of android studio is incompatible with the gradle version used.Try disabling the instant run
Android StudioBuildAndroid Studio Problem Overview
I am able to build the app properly, but when I run it I get this error:
This version of android studio is incompatible with the gradle version used.Try disabling the instant run
Android Studio Solutions
Solution 1 - Android Studio
You can use normal build run rather than instant run.
Check first
Go to Settings/Preferences > Build, Execution, Deployment option > Instant Run and uncheck all the three boxes.
-
Upgrading Gradle services URL:
Project > Gradle > Wrapper > gradle-wrapper.properties
Change URL from
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
to
distributionUrl=https\://services.gradle.org/distributions/gradle-2.11-all.zip
(Find latest distributionUrl gradle plugin version Here: http://services.gradle.org/distributions
**Make sure to use gradle-x.xx-all.zip )
-
Delete your build folder
When you run project, build folder will be created automatically
-
Go to BUILD option in menu > Clean the project, Build the project
It should work without instant run.
Solution 2 - Android Studio
I had easy steps & correct way also
1 - In Settings
-> Build, Execution, Deployment
option -> Instant Run
2 - Clear Enable instant run to hot swap code
3 - Clean project
p/s : It should totally work.
Solution 3 - Android Studio
The Gradle Plugin used is typically the same as the version of Android studio you are using.
Check the Android Studio version >Help → About
and the version will read
Android Studio Version X.Y.Z
Then, go to >Project → Gradle Scripts → build.gradle(Project)
and under dependencies change the classpath to
classpath 'com.android.tools.build:gradle:X.Y.Z'
and rebuild/sync the project.
Solution 4 - Android Studio
You can disable instant run by follow these steps in Android Studio:
> File → Settings → Preferences dialog → Build → Execution → Deployment > → Instant Run → Update Project
This feature introduced in Android Studio 2. however, when you disable it, next time when you try to push new app to your emulator is running much slower.
In my case I just update Android Studio to the latest build from canary channel and it's works without disable this feature.
Hope it's help
Solution 5 - Android Studio
As commented by sjd: Just cleaning the project and build again might help if you, just like me, have used the automatic update applied by android studio.
Solution 6 - Android Studio
I just did a Build > Clean project and then reRun app!
Solution 7 - Android Studio
I wanted to run the app in debug mode and got the same message, so I tried:
- File > Invalidate caches and restart...
- Clean project
- Build project
Nothing worked...
Then, I just clicked on the green arrow to run the project without debugging...
Worked!
So then I just added a debugging session with the option left of the stop button in Android Studio.
Solution 8 - Android Studio
I did fix by this way.
Update your classpath to classpath 'com.android.tools.build:gradle:2.0.0'
in your top level build.gradle file.
Done
Solution 9 - Android Studio
I just Deleted the Build Folder and Clean project.It worked for me...!!!
Solution 10 - Android Studio
In Android Studio 2.3.3
File -> Settings -> Build, Execution, Deployment -> Instant Run -> Unable Instant Run to hot swap code (Uncheck it)
Now, you have disable Instant Run...
It will solve Instant Run issue.