So I just updated to 0.4.2 and all of a sudden I'm getting an error about the Gradle version. I tried some stuff the similar questions said by choosing "Use local gradle distribution" in "Gradle Settings" to the one that the error is asking for. So far, these are the messages I've been getting:
You are using Gradle version 1.6, which is not supported. Please use version 1.9.
Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)
You are using Gradle version 1.8, which is not supported. Please use version 1.9.
Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)
Gradle version 1.6 is required. Current version is 1.9.
Please fix the project's Gradle settings.
It's been alternating between those errors depending on which version I switch to, so I'm not really sure what the problem is. Also, I did download version 1.8(-all) from the gradle website, but the other versions have been downloaded by Android Studio I believe.
Here are at least two ways you can find out the gradle version (not the gradle plugin version) by selecting one of the following on project tab on left: Android > Gradle Scripts > gradle-wrapper. properties (Gradle Version) > distributionURL.
If you are using Gradle for Android, you need to move to version 3.3 or higher of both the Android Gradle Plugin and Android Studio.
Open your gradle. properties file in Android Studio. Restart Android Studio for your changes to take effect. Click Sync Project with Gradle Files to sync your project.
You need to use Gradle 1.9 with android studio 0.4.2. Point the distribution url to gradle 1.9 or your build.gradle should look something like this:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
If that doesn't work delete the gradle directory and give it a run. It should download the appropriate libraries on its own
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With