Unrecognized Android Studio or Android Support plugin for IntelliJ IDEA version '202.7660.26.42.7351085', please retry with version 2021.2.1 or newer.
报错
Unrecognized Android Studio (or Android Support plugin for IntelliJ IDEA) version ‘202.7660.26.42.7351085’, please retry with version 2021.2.1 or newer.
解决
低版本的android导入高版本的工程
7.3.1修改适配android 4.2.1
setting.gradle
保留rootProject.name =
和include ‘:app’
其余注释
//pluginManagement {
// repositories {
// gradlePluginPortal()
// google()
// mavenCentral()
// }
//}
//dependencyResolutionManagement {
// repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
// repositories {
// google()
// mavenCentral()
// }
//}
rootProject.name = "Setting"
include ':app'
build.gradle
注释掉原先的plugins{}
添加
buildscript {}
allprojects {}
task clean(type: Delete) {
delete rootProject.buildDir
}
重新build即没有报错
Top-level build file where you can add configuration options common to all sub-projects/modules.
//plugins {
// id 'com.android.application' version '7.3.1' apply false
// id 'com.android.library' version '7.3.1' apply false
//}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}