当前位置: 首页 > 工具软件 > oss-server > 使用案例 >

Unknown host archiva-maven-storage-prod.oss-cn-beijing.aliyuncs.com 异常处理

孟英锐
2023-12-01

Unknown host archiva-maven-storage-prod.oss-cn-beijing.aliyuncs.com

android studio 升级到
Android Studio Bumblebee | 2021.1.1
Build #AI-211.7628.21.2111.8092744, built on January 19, 2022
Runtime version: 11.0.11+9-b60-7590822 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 12
Registry: external.system.auto.import.disabled=true

运行以前的项目,突然就报错:
Unknown host archiva-maven-storage-prod.oss-cn-beijing.aliyuncs.com

找到根build.gradle
注释掉
//maven { url ‘https://maven.aliyun.com/repository/google’ }
//maven { url ‘https://maven.aliyun.com/repository/public’ }
用 google()
mavenCentral()
问题解决

buildscript {
repositories {
google()
mavenCentral()
//maven { url ‘https://maven.aliyun.com/repository/google’ }
//maven { url ‘https://maven.aliyun.com/repository/public’ }
}
dependencies {
classpath ‘com.android.tools.build:gradle:3.5.3’
}
}
allprojects {
repositories {
google()
mavenCentral()
//maven { url ‘https://maven.aliyun.com/repository/google’ }
//maven { url ‘https://maven.aliyun.com/repository/public’ }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

 类似资料: