Android studio 旧项目打开就报错Gradle sync failed: Could not GET Received status code 504 from server
17:50 Gradle sync failed: Could not GET 'https://jcenter.bintray.com/com/android/tools/lint/lint-api/25.3.3/lint-api-25.3.3.pom'. Received status code 504 from server: Gateway Time-outConsult IDE log
17:50 Gradle sync failed: Could not GET 'https://jcenter.bintray.com/com/android/tools/lint/lint-api/25.3.3/lint-api-25.3.3.pom'. Received status code 504 from server: Gateway Time-out
Consult IDE log for more details (Help | Show Log) (18 s 552 ms)
打开的时候提示这个:
最后看到网上这个兄弟的,https://blog.csdn.net/qq_40811718/article/details/86667523,把工程的gradle中buildscript下repositories把google()注释掉再加上maven个配置项。
buildscript {
repositories {
mavenCentral()
maven { url 'https://maven.google.com' }
maven{url 'https://jitpack.io'}
// google()
jcenter()
maven {
url 'http://maven.aliyun.com/nexus/content/groups/public/'
}
}
这个之后还是不能加载gradle,比例rxjava版本等太低了,2.0.1的已经下载不了了。直接改了rajava和retrofit版本翻qiang直接下载不理了。
然后还是报错:提示Error:Failed to resolve: javax.inject:javax.inject:1
网上找到:https://blog.csdn.net/qq_32290639/article/details/98873065,我看到可以运行了就直接运行没处理了,build中某个文件报错,删除了build,清除缓存重启andoid studio,
就可以了。
更多推荐
所有评论(0)