有幾十個教程如何修復錯誤The project is using an unsupported version of Gradle.
,但它們都不適用於我。我總是得到一個錯誤:無論我做什麼,我總是得到「不支持的Gradle版本」
The project is using an unsupported version of Gradle. Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)
,它甚至沒有說哪個搖籃,我應該使用哪些其他人相處!
我使用過Android Studio 0.9.1,我試圖打開一個搖籃項目,該項目是依賴於搖籃0.12 +(在build.gradle
行說
classpath 'com.android.tools.build:gradle:0.12.+'
)
我改變了這classpath 'com.android.tools.build:gradle:0.14.+'
但仍然有同樣的錯誤。
然後我去<project>/gradle/wrapper
和編輯文件gradle-wrapper.properties
說distributionUrl=http\://services.gradle.org/distributions/gradle-1.14-all.zip
。這也沒有幫助。
然後我去每個子目錄,發現所有build.gradle
文件,包括Facebook和其他庫這樣的文件,並改了行:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.14.+'
}
}
apply plugin: 'android'
...
但是這也不能工作。
所以我現在無能爲力,因爲所有的教程都提出了我試過的解決方案。
爲什麼我不能導入這個項目?我在哪裏犯錯誤?
我不認爲這是你的問題,但你應該使用'apply plugin:'com.android.application''來代替'apply plugin:'android'' – 2014-11-05 19:23:07