Reputation: 45305
I am using Android Studio (Canary) 2.1 Preview 4.
When I tried to change
classpath 'com.android.tools.build:gradle:2.1.0-alpha4'
to
classpath 'com.android.tools.build:gradle:2.1.0-alpha3'
I get the dialog message
"The project is using an incompatible version of the Android Gradle plugin"
and Android Studio suggests to change it back to alpha4
Update:
But I can set com.android.tools.build:gradle:1.5.0
.
And I can not set com.android.tools.build:gradle:2.0.0
.
Looks like there is any relation between the AS version and Gradle version.
How can I set 2.0.0
gradle veriosn in AS 2.1 ?
Upvotes: 1
Views: 1822
Reputation: 38233
Android Studio 2.0 Beta 7 works only with release version of Android gradle build plugin (1.5.0) or 2.0.0-beta7. I assume a similar relation applies to AS 2.1 Preview 4 so that it only works with build plugin 1.5.0 or 2.1.0-alpha4.
Build plugins 2.0 and 2.1 are supposed to be essentially the same with 2.1 adding support for Android N. The same applies to Andorid Studio.
A number of developers have asked what the difference is between 2.0 and 2.1. In short:
- 2.0 is nearly done; release candidate 1 was posted yesterday
- 2.1 is basically just 2.0 plus fixes to support the Android N Preview SDK.
Source: http://tools.android.com/recent/androidstudio21preview5available
If you want to use 2.0 build plugin, install AS 2.0.
Using multiple Android Studio versions
Instant Run. Since it's a beta the API and internals of Instant Run are constantly changing. This is done in the gradle build plugin. However AS uses the changing API so it has to be updated as well.
Upvotes: 4