![](/img/trans.png)
[英]feature andoid module - not permite to use apply plugin: 'com.android.feature'
[英]Android Studio: Plugin with id 'com.android.feature' not found
我将 android 工作室项目移动到另一台计算机上,当 gradle 同步时出现此错误:
A problem occurred evaluating project ':base'.
> Plugin with id 'com.android.feature' not found.
这是 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')
}
以下是 gradle 版本:
com.android.feature
插件已被弃用一段时间,最终在 AndroidDC37B5CC41FB5671 的 4.0.0 中删除有关更多详细信息,请参见此处。
所以,看起来你有两个选择。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.