![](/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.