------------恢复内容开始------------
报错原因:
Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'
网上说的解决方法都无效,增加了SS代理也无
折腾了一会儿,好像可以了。
build.gradle内容改为如下:
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { //google() //jcenter() maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' } maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'} } dependencies { classpath 'com.android.tools.build:gradle:3.5.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' } maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'} //google() //jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }
------------恢复内容结束------------