I installed Android Studio 0.5.1 and my project is not working any more. Error it provides is:
The project is using an unsupported version of Gradle. Please use version 1.10.
I tried to change settings in gradle-wrapper.properties and gradle.build file, but without luck.
gradle-wrapper.properties file:
#Wed Mar 12 11:11:46 CET 2014 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
My gradle.build looks like this:
buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.9.+' } } apply plugin: 'android' repositories { mavenCentral() } dependencies { compile fileTree(dir: 'libs', include: '*.jar') compile 'de.timroes.android:EnhancedListView:0.3.1@aar' } android { compileSdkVersion 19 buildToolsVersion "19.0.0" sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } instrumentTest.setRoot('tests') debug.setRoot('build-types/debug') release.setRoot('build-types/release') } }
How can I force Android Studio to download gradle 1.10 or 1.11?
Thanks!
Android Studio comes with a working installation of Gradle, so you don't need to install Gradle separately in that case. In order to create a new build or add a Wrapper to an existing build, you will need to install Gradle according to these instructions.
You can specify the Gradle version in either the File > Project Structure > Project menu in Android Studio, or update your Gradle version using the command line.
Try this:
Modify the gradle-wrapper.properties
distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip
and your build.gradle
compileSdkVersion 19 buildToolsVersion "19.0.1"
running:./gradlew clean assemble
in the terminal
Also you may want to read this
glhf
https://plus.google.com/101589574290830309525/posts/7YzcE6YpfwK
I finally solved it, by removing .idea folder and all .iml files and imported project as new one.
I encountered this problem when i tried to import an gradle project from github. There was no gradle wrapper in the project. I created a new android project in android studio and copied gradle folder to the project that i get from github. Then in the settings of the project in gradle section,i chose the "use default gradle wrapper". Then problem is solved.
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