I am just trying to compile the latest version of u2020-daggr2 in Android stu![e I imported it as a gradle project. But I get error complaining about gradle! I did edit the gradle-wrapper.properties. Rebuilding however did not work. I did see: Gradle 2.1 is required Migrate to Gradle wrapper and sync project which seems like same issue but on Studio I did not find:
Settings -> Gradle and click Use default gradle wrapper (recommended).
I did not find where to do this in Studio. First off there is no menu that just says Setting. There is : File->Other Setting->Default Setting. But nothing but gradle vm parameters etc. Nothing about using default gradle wrapper. Do I need to have a local copy of gradle 2.1 for this to work? ![enter image description here][4]
gradle wrapper.properties is edited as such: distributionUrl=https://services.gradle.org/distributions/gradle-2.1-all.zip
Error:(20) A problem occurred evaluating root project 'u2020-dagger2'.
Failed to apply plugin [id 'com.android.application'] Gradle version 2.1 is required. Current version is 2.2.1. If using the gradlewrapper, try editing the distributionUrl in /Users/Mac1/Downloads/u2020-dagger2 /gradle/wrapper/gradle-wrapper.properties to gradle-2.1-all.zip
click on your build.gradle file in project explorer and make changes as
dependencies {
classpath 'com.android.tools.build:gradle:1.1.2
}
ReBuild your project! Hope this helps.
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
)
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