gpt4 book ai didi

gradle - Android Studio 0.4.2, Gradle 版本困惑

转载 作者:行者123 更新时间:2023-12-03 16:00:52 25 4
gpt4 key购买 nike

所以我刚刚更新到 0.4.2,突然间我收到了关于 Gradle 版本的错误。我尝试了一些类似问题所说的内容,方法是在“Gradle 设置”中选择“使用本地 gradle 分发”到错误要求的那个。到目前为止,这些是我收到的消息:

You are using Gradle version 1.6, which is not supported. Please use version 1.9.
Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)

You are using Gradle version 1.8, which is not supported. Please use version 1.9.
Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)

Gradle version 1.6 is required. Current version is 1.9.
Please fix the project's Gradle settings.

根据我切换到的版本,这些错误会交替出现,所以我不确定问题是什么。另外,我确实从 gradle 网站下载了 1.8(-all) 版本,但我相信其他版本已由 Android Studio 下载。

最佳答案

您需要将 Gradle 1.9 与 android studio 0.4.2 一起使用。将分发 url 指向 gradle 1.9 或者你的 build.gradle 应该是这样的:

 buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}

如果这不起作用,请删除 gradle 目录并运行它。它应该自己下载适当的库

关于gradle - Android Studio 0.4.2, Gradle 版本困惑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21069275/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com