gpt4 book ai didi

android - 找不到 gradle 3.0.0-alpha4

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:51:11 25 4
gpt4 key购买 nike

几天前,我安装了 android studio 3.0(预览版),之后安装了稳定版(studio 2.3.3),当我尝试导入项目时出现错误。在预览中一切正常。这是一个错误:

Error:Could not find com.android.tools.build:gradle:3.0.0-alpha4.
Searched in the following locations:
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/3.0.0-alpha4/gradle-3.0.0-alpha4.pom
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/3.0.0-alpha4/gradle-3.0.0-alpha4.jar
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0-alpha4/gradle-3.0.0-alpha4.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0-alpha4/gradle-3.0.0-alpha4.jar
Required by:
project :

最佳答案

If you're opening an existing project using Android Studio 3.0 Preview 1 or later, follow the prompts to automatically update your project to the latest version of the Android plugin. To manually update your project, include the maven repo and change the plugin version in your project-level build.gradle file as follows:

打开您的项目级别 build.gradle 部分。

您应该添加 maven { url 'https://maven.google.com' }

示例

 buildscript {
repositories {
jcenter()
// You need to add the following repository to download the new plugin.
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha4' // Same for alpha6

}
}

allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
}

关于android - 找不到 gradle 3.0.0-alpha4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44645099/

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