【发布时间】:2018-11-08 21:49:30
【问题描述】:
我正在尝试构建我的 Android 项目,但是当我重新构建时收到以下错误消息:
注解处理器现在必须显式声明。发现编译类路径的以下依赖项包含注释处理器。请将它们添加到 annotationProcessor 配置中。 - 黄油刀5.1.2.jar(黄油刀5.1.2.jar)
或者,设置 android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true 以继续之前的行为。请注意,此选项已弃用,将来将被删除。 详情请见https://developer.android.com/r/tools/annotation-processor-error-message.html。
这是我的 build.gradle:
apply plugin: 'com.android.application'
buildscript {
repositories {
google()
mavenCentral()
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.wakeup.xxx"
minSdkVersion 28
targetSdkVersion 28
versionCode 28
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
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:25.1.1'
testImplementation 'junit:junit:4.12'
implementation 'com.jjoe64:graphview:4.2.2'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}
谁能帮帮我?
【问题讨论】:
标签: android android-studio build