时间:2019/12/7android
最近在作安卓大做业时老是遇到从GitHub上下载下来的demo不能在本地Android studio中运行的问题,感受真的被安卓中的各类版本给恶心到了,下面记录其中比较典型的一个问题.maven
报错以下:post
Could not find com.android.tools.build:gradle:3.5.0. Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.jar Required by: project : Add Google Maven repository and sync project Open File
解决方法以下:gradle
1.打开下图所示文件:ui
2.注释掉release中的内容google
3.加入repostoriesurl
1 repositories { 2 3 maven { 4 5 url "https://maven.google.com" 6 7 } 8 9 }
4.从新编译gradlespa
注:上述步骤都是在各类版本号配置好以后的措施code