android studio打开项目出现 Plugin with id ‘com.android.application‘ not found.
在csdn上下载了一个android项目,用android studio打开项目出现 Plugin with id ‘com.android.application’ not found.发现该项目只有一个build.gradle解决方法:打开build.gradle,在文件后面添加buildscript {repositories {maven { url 'https://maven.aliy
·
在csdn上下载了一个android项目,用android studio打开项目出现 Plugin with id ‘com.android.application’ not found.
发现该项目只有一个build.gradle
解决方法:
打开build.gradle,在文件后面添加
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
//注意:更换成自己的AS的版本
}
}
allprojects {
repositories {
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
}
}
更多推荐
已为社区贡献2条内容
所有评论(0)