Android Studio一直在download - 修改Gradle使用国内源 - 阿里云Maven镜像仓库地址 - 报错platform ‘android-30‘ not found.
怎么下载更多的android版本?没有爬墙的梯子,就别想了。修改\simpleDemo\build.gradle,从。没有android33?关掉AS再打开,飞起!
·
修改Project模式下的/build.gradle 换源

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
// google()
// jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
// google()
// jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
关掉AS再打开,飞起!
报错
Module: 'simpleDemo' platform 'android-30' not found.
解决办法:
修改\simpleDemo\build.gradle,从
compileSdkVersion 30
到
compileSdkVersion 33
保存,重启即可.
没有android33? 点这看:

怎么下载更多的android版本? 。。。。 没有爬墙的梯子,就别想了。。。。
更多推荐
所有评论(0)