Erro no Android Studio

  • Respostas:0
Jayme neto
  • Posts no fórum: 1

08/11/2018, 23:29:15 via Web

Olá, alguém poderia me ajudar com um problema que estou tendo no Android Studio?

Estou recebendo essa mensagem de erro:

**Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor configuration.
- butterknife-5.1.2.jar (butterknife-5.1.2.jar)
Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior. Note that this option is deprecated and will be removed in the future.

Essa é minha 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'

}

Eu acrestei as ultimas duas linhas, mas se mudo para butterknife :5.1.2 ele não consegue encontrar porque essa versão já é antiga. E com o 8.8.1 ele não recenhece e insiste que precisa ser o 5.1.2.

Eu agradeço muito se alguém puder me ajudar.

Seja o primeiro a responder