问题描述
我安装的Android 0.5.1工作室和我的项目不能正常工作了。
错误时提供的是:
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.
我试图改变在gradle-wrapper.properties和gradle.build文件设置,但没有运气。
I tried to change settings in gradle-wrapper.properties and gradle.build file, but without luck.
gradle-wrapper.properties文件:
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
我gradle.build看起来是这样的:
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')
}
}
我怎么能强迫的Android Studio中的gradle下载1.10 1.11?
How can I force Android Studio to download gradle 1.10 or 1.11?
谢谢!
推荐答案
试试这个:
修改gradle-wrapper.properties
Modify the gradle-wrapper.properties
distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip
和您的build.gradle
and your build.gradle
compileSdkVersion 19
buildToolsVersion "19.0.1"
运行: ./ gradlew干净组装
终端
此外,你可能需要阅读
Also you may want to read this
glhf
https://plus.google.com/101589574290830309525/posts/7YzcE6YpfwK
我终于解决了这个问题,通过删除.idea文件夹和所有.iml文件并导入项目作为新的。
这篇关于力Android Studio中下载和安装1.10的gradle或1.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!