我正试图在安卓系统中创建一个功能,但我得到了以下错误
正在执行任务。[:app:assembleDebug] 在项目中 C:\Users\wilso\OneDrive\Documents\retrofit_system\retrofit_system
配置项目 :feature:webview 警告:com.android.feature插件已被废弃,并将在2019年底前删除。请 转而使用动态特性或库。欲了解更多关于 更多关于将您的应用程序转换为使用Android App Bundles的信息,请访问 https://developer.android.com/topic/google-play-instant/feature-module-migration 警告:com.android.feature插件已被废弃,并将在2019年底前被移除。 将在2019年年底前删除。请改用动态特性或 库。欲了解更多关于将你的应用程序转换为 使用安卓应用包的更多信息,请访问 https://developer.android.com/topic/google-play-instant/feature-module-migration
失败。构建失败,出现异常。
出了什么问题。在配置项目':feature:webview'时出现了问题。
kotlin-android "希望有一个Android Gradle插件被应用到该项目中。 * android * com.android.application * android-library * com.android.library * com.android.test * com.android.feature * com.android.dynamic-feature * com.android.instantapp
尝试一下。用--stacktrace选项运行以获得堆栈跟踪。用--info或--debug选项运行,获得更多的日志输出。用--scan选项运行,以获得完整的洞察力。
获取更多帮助,请访问 https://help.gradle.org
构建失败,耗时383ms
gradle是下一个
apply plugin: 'com.android.feature'
apply plugin: 'kotlin-android'
android {
defaultConfig {
consumerProguardFiles 'consumer-proguard-rules.pro'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
lintOptions {
disable 'RtlEnabled'
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
dependencies {
我搜索了任何解决方案,但我什么也得不到。
如果我使用下一个gradle,它的功能是
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.co.webview"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
但我不想创建一个应用程序,因为我想创建一个功能。