gpt4 book ai didi

java - Android studio 错误 : The java plugin has been applied, 但它与 Android 插件不兼容

转载 作者:行者123 更新时间:2023-12-02 05:58:34 26 4
gpt4 key购买 nike

自从我更新 Android Studio 以来,我的应用程序无法像更新前那样运行。

我已尝试删除缓存文件夹

这就是代码:

       apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId 'daxilgames.footballplayersquiz2019'
minSdkVersion 17
targetSdkVersion 28
apply plugin: 'jdepend'
apply plugin: 'antlr'
apply plugin: 'announce'
apply plugin: 'com.android.application'
versionCode 3
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable false
}
}
productFlavors {
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.android.gms:play-services-ads:11.0.4'
testImplementation 'junit:junit:4.12'
}

最佳答案

ANTLR 插件 antlr 扩展了 Java 插件 java(并隐式应用它),并且您不能同时应用 com.android.applicationjava 插件位于同一模块中,因此您会收到错误

The 'java' plugin has been applied, but it is not compatible with the Android plugins .

尝试删除行apply plugin: 'antlr'

关于java - Android studio 错误 : The java plugin has been applied, 但它与 Android 插件不兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55992121/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com