I moved an android studio project onto another computer and I got this error when the gradle was syncing:
A problem occurred evaluating project ':base'.
> Plugin with id 'com.android.feature' not found.
Here is the code in build.gradle (:base)
apply plugin: 'com.android.feature'
configurations.all {
resolutionStrategy {
force 'com.android.support:support-annotations:23.1.1'
}
}
android {
compileSdkVersion 28
baseFeature true
defaultConfig {
minSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
//noinspection GradleCompatible
api 'com.android.support:appcompat-v7:28.0.0'
api 'com.android.support.constraint:constraint-layout:2.0.4'
application project(':app')
feature project(':app')
implementation fileTree(include: ['*.jar'], dir: 'libs')
}
Here are the gradle versions:
The com.android.feature
plugin has been deprecated for some time and was finally removed in 4.0.0 of the Android Gradle Plugin. See here for more details.
So, it looks like you have 2 options.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.