Android studio 3.1 导入app项目后,gradle无法获取 pom文件
具体保存内容如下:
Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.pom
'. Received status code 400 from server: Bad Request
Enable Gradle 'offline mode' and sync project
方法:
配置maven地址为国内的,Android studio 勾选生效
1、build.gradle文件中增加:
allprojects {repositories {google()jcenter()maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }}
}
-------------
请关注我的订阅号 松门一枝花