問題描述
有一個新的 Android Studio 更新:https://sites.google.com/a/android.com/tools/recent/androidstudio030released
There is a new Android Studio update: https://sites.google.com/a/android.com/tools/recent/androidstudio030released
鏈接說:
Gradle 1.8 和Android Gradle 插件版本 0.6.+
The improved performance is made possible by changes in Gradle 1.8 and Android Gradle plugin version 0.6.+
所以我像這樣更改了我的依賴項:
So I changed my dependencies like this:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
但我不知道在哪里可以將 Gradle 1.6 更改為 1.8 ...
But I don't know where I can change the Gradle 1.6 to 1.8 ...
當我編譯應用程序時,我遇到了這個錯誤:
And when I compile the app I've got this error:
Gradle:評估項目時出現問題.
Gradle: A problem occurred evaluating project.
需要 Gradle 版本 1.8.當前版本是 1.6
Gradle version 1.8 is required. Current version is 1.6
在哪里可以更改版本?
提前致謝:)
推薦答案
我不確定這是否會對你有所幫助,但這是為我解決的問題:
I am not sure if this will help you but here is what fixed it for me:
在你的項目中打開這個文件:
Open up this file in your project:
<項目>/gradle/wrapper/gradle-wrapper.properties
編輯 distributionUrl 行并設置它:
Edit the distributionUrl line and set it too:
distributionUrl=https://services.gradle.org/distributions/gradle-1.8-all.zip
重建您的項目.
更新:您現在可能想使用 gradle-2.8-all.zip
.
Update: You might want to use gradle-2.8-all.zip
now.
這篇關于需要 Gradle 版本 1.8.當前版本是 1.6的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!