gpt4 book ai didi

android - 在 android studio 3.0 中升级到 gradle 3.0 版本时出现 apt 错误

转载 作者:太空狗 更新时间:2023-10-29 14:41:23 25 4
gpt4 key购买 nike

我想更新我的项目以在 android studio 3.0 中运行。更新时,apt 出现错误。我改变了我完整的 build.gradle 意味着所有编译到实现。这是我的 build.gradle 文件。

这是我的错误:

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

这是我的build.gradle:

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'


android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.sample"
minSdkVersion 19
targetSdkVersion 26
multiDexEnabled true
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
configurations{
all*.exclude module: 'servlet-api'
}
dexOptions {
javaMaxHeapSize "4g"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'

}
configurations.all {
resolutionStrategy {
force 'com.android.support:support-annotations:26.0.2'
}
}

}

dependencies {
implementation project(':androidHorizontalListView')
implementation project(':library')
implementation project(':simpl3r')



implementation 'com.google.code.gson:gson:2.2.4'
implementation files('libs/acra-4.5.0.jar')
implementation files('libs/bugsense-3.6.jar')
implementation files('libs/espresso-1.1-bundled.jar')
implementation files('libs/sample-2.4.1.jar')
implementation files('libs/signpost-commonshttp4-1.2.1.1.jar')
implementation files('libs/signpost-core-1.2.1.1.jar')
implementation files('libs/twitter4j-core-4.0.2.jar')
implementation files('libs/universal-image-loader-1.9.2-SNAPSHOT-with-sources.jar')
implementation files('libs/volley.jar')
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation files('libs/gcm.jar')
implementation files('libs/mint-5.2.1.jar')
implementation project(':swipelibrary')


implementation files('libs/glide-3.7.0.jar')
implementation files('libs/glide-3.7.0-javadoc.jar')
implementation 'org.jsoup:jsoup:1.8.3'
implementation 'org.mozilla:rhino:1.7.7'
implementation 'info.guardianproject.netcipher:netcipher:1.2'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.thefinestartist:utils:0.9.1'
apt 'com.thefinestartist:compilers:0.9.1'
implementation 'com.android.support:recyclerview-v7:26.0.2'
implementation 'in.srain.cube:grid-view-with-header-footer:1.0.12'
implementation 'joda-time:joda-time:2.9.2'
implementation 'com.writingminds:FFmpegAndroid:0.3.2'

//implemented retrofit.
testImplementation 'junit:junit:4.12'


implementation 'com.android.support:appcompat-v7:26.0.2'
implementation 'com.squareup.retrofit:retrofit:1.9.0'

implementation 'com.google.android.gms:play-services-analytics:10.2.1'
implementation 'com.facebook.android:facebook-android-sdk:4.26.0'

implementation 'com.android.support:design:26.0.2'
implementation 'com.flurry.android:analytics:6.3.1'
implementation project(':sample-chat')


implementation 'com.quickblox:quickblox-android-sdk-core:3.1.0'
implementation "com.google.android.gms:play-services-gcm:10.2.1"


implementation project(':sample-core')

}

最佳答案

您通过 this answer 启用注释处理, 然后你可以删除行

应用插件:'com.neenbedankt.android-apt'

并替换

apt 'com.thefinestartist:compilers:0.9.1'

annotationProcessor 'com.thefinestartist:compilers:0.9.1'

关于android - 在 android studio 3.0 中升级到 gradle 3.0 版本时出现 apt 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47791805/

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