我在您的构建中遇到访问被拒绝的错误,我没有使用它,但我会尽力回答你。
正如宣布的那样here https://androidstudio.googleblog.com/2017/06/android-studio-30-canary-3-is-now.html:
Android Gradle Plugin 3.0.0-alpha3 也通过
maven.google.com。
您可以尝试通过添加 Google 的 Maven 存储库来修复它here https://gist.github.com/anonymous/a3cfeb0db2225c6f62f7b5fd875f6316#file-build-gradle-L6 like this https://developer.android.com/topic/libraries/support-library/setup.html:
buildscript {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
确保存储库部分包含 Maven 部分
这 ”https://maven.google.com https://maven.google.com" 端点。例如:
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
正如评论的here https://stackoverflow.com/a/44366452/1009132,Bintray JCenter 中不存在此版本:
com.android.tools.build.gradle https://bintray.com/android/android-tools/com.android.tools.build.gradle最新版本是2.5.0-alpha-preview-02,没有3.0.0-alpha3
另请务必按照中的建议将构建工具更新到最新版本这个相关问题 https://stackoverflow.com/q/44366261/1009132:
从 SDK 管理器更新您的构建工具
我使用新的添加了示例链接sdkmanager
命令行here https://stackoverflow.com/q/42731625/1009132.
我需要一个重现问题的示例项目来检查我的建议。