Android Studio Gradle Issue Upgrading to Version 0.5.0 - Gradle Migrating from 0.8 to 0.9 - Also Android Studio Upgrade to 0.8.1

Android Studio Gradle issue upgrading to version 0.5.0 - Gradle Migrating From 0.8 to 0.9 - Also Android Studio upgrade to 0.8.1

To fix it, open file called build.gradle in the project root, and change gradle version there to 0.9.+.

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}

To be repeated for each project ;(

If you then get a message like "Unable to load class 'org.gradle.api.artifacts.result.ResolvedComponentResult".

Go to you project_folder/gradle/wrapper directory and edit Unable to load class 'org.gradle.api.artifacts.result.ResolvedComponentResult'. file changing the distributionUrl to

distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip

After upgrade to version 0.8.1 (full download and copy SDK folder over), had to have new version of gradle installed by IDE (using the "Fix it" link a couple of time :S ), and modifing the "android" section of the gradle file in project folder from 19.0 to 19.1, as below:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
}
}
apply plugin: 'android'

repositories {
mavenCentral()
}

android {
compileSdkVersion 19
buildToolsVersion '19.1.0'

defaultConfig {
minSdkVersion 7
targetSdkVersion 19
}
}

dependencies {
compile 'com.android.support:appcompat-v7:19.1.+'
compile 'com.android.support:support-v4:19.1.0'
}

Android Studio, gradle plugin and gradle version information missing

This is the closest result I could get.

https://developer.android.com/tools/revisions/gradle-plugin.html

Hope this helps.

How to import AndroidResideMenu in Android Studio?

Pay attention:

classpath 'com.android.tools.build:gradle:0.6.+'

This is the gradle plugin for Android.
Now you can use the 0.12.2 with gradle 1.12.

There is a relation between gradle-plugin and the gradle version.

You can check this link for all cases: Android Studio Gradle issue upgrading to version 0.5.0 - Gradle Migrating From 0.8 to 0.9 - Also Android Studio upgrade to 0.8.1

Gradle 1.12 is the version of Gradle used by your project.
You can change the version in this file:

rootProject/gradle / wrapper / gradle-wrapper.properties

changing this key:

distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip

Android Studio Unsupported Version of Gradle Plugin

Android Studio 0.8.1 requires the gradle-plugin 0.12.

buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
}
}

Check this answer for compatibility:

Android Studio Gradle issue upgrading to version 0.5.0 - Gradle Migrating From 0.8 to 0.9 - Also Android Studio upgrade to 0.8.1

relation between gradle version and gradle build tool version

I will try to answer your questions.

  1. As you said, Gradle is a build tool, but the line you have mentioned in your first question is referring to Gradle Java plugin version. Gradle has plugin for building Java projects. These plugins extend upon the general purpose build tool Gradle is, and may provide additional features. You can read more about the Gradle plugins here.

  2. The reason your build fails when you change the plugin version is simple, the plugin version 0.8 is not there. There is a relationship between Gradle version and the plugin version and a developer has to maintain that. You can only use a plugin version which has been released and is compatible with the Gradle version. I hope the answer to first question answers this anyways.

What is the relation between the version of Android Studio and version of Gradle Plugin?

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.

Android Tools project site

Using multiple Android Studio versions



Why does AS version X only work with build plugin version X?

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.

Android Studio 1.1 Gradle 2.2.1 Gradle version 2.1 required current version is 2.2.1

You have to use this gradle-plugin in your build.gradle

classpath 'com.android.tools.build:gradle:1.1.0'

Android Studio 1.1.0 requires:

  • Gradle 2.2.1 (you can set this value in the gradle-wrapper.properties)

  • Gradle plugin 1.0.0/1.1.0 (you can set this value in your build.gradle)



Related Topics



Leave a reply



Submit