好久没用Android写程序了,一打开发现成了这个样子。。。
最开始是:plugin with id 'com.android.application' not found
修改成了以下内容:
apply plugin: 'com.android.application'
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
//版本号请根据自己的gradle插件版本号自行更改
classpath 'com.android.tools.build:gradle:7.2.1'
}
}
settings.gradle:
pluginManagement {
repositories {
maven { url 'https://maven.aliyun.com/repository/jcenter'}
maven { url 'https://maven.aliyun.com/repository/google'}
maven { url 'https://maven.aliyun.com/repository/central'}
maven { url 'https://maven.aliyun.com/repository/gradle-plugin'}
google()
jcenter()
}
}
dependencyResolutionManagement