gpt4 book ai didi

android - Android-android-apt插件与Android Gradle插件不兼容。

转载 作者:行者123 更新时间:2023-12-03 05:09:06 32 4
gpt4 key购买 nike

自Gradle更新以来,我正在努力使这个项目达到标准。这是一个团队项目,它使用的是android-apt插件。我已经进行了必要的语法更改(编译->实现和apt->注释处理器),但是编译器仍在告诉我存在差异:

android-apt plugin is incompatible with the Android Gradle plugin.  Please use 'annotationProcessor' configuration instead.

谁有想法?

感谢您的任何见解

-T
buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
}
}

apply plugin: 'com.android.application'
apply plugin: 'android-apt'
def AAVersion = '4.0.0'
def JacksonVersion = '2.6.0'
def GPSVersion = '6.5.87'

dependencies {
implementation 'com.android.support:appcompat-v7:23.0.0'
implementation 'com.android.support:design:23.0.0'
implementation 'com.android.support:recyclerview-v7:23.0.0'
implementation 'com.android.support:preference-v7:23.0.0'

implementation "com.google.android.gms:play-services-maps:$GPSVersion"
implementation "com.google.android.gms:play-services-location:$GPSVersion"

implementation 'com.facebook.android:facebook-android-sdk:4.5.0'

annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
annotationProcessor "org.androidannotations:rest-spring:$AAVersion"
implementation "org.androidannotations:androidannotations-api:$AAVersion"
implementation "org.androidannotations:rest-spring-api:$AAVersion"

implementation 'org.springframework.android:spring-android-rest-template:2.0.0.M3'

}
repositories {
maven {
url 'https://repo.spring.io/libs-milestone'
}
}

apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
resourcePackageName "app"
logLevel 'TRACE'
logAppenderConsole 'true'
}
}

android {
compileSdkVersion 23
buildToolsVersion '27.0.3'

defaultConfig {
applicationId "app"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
shrinkResources false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
}

allprojects {
repositories {
jcenter()
mavenCentral()
google()
}
}

最佳答案

尝试删除-

classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'


apply plugin: 'android-apt'

注释处理功能已在Android Gradle插件(2.2及更高版本)中提供,因此现在无需/无需提供额外的注释。

关于android - Android-android-apt插件与Android Gradle插件不兼容。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51217469/

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