登 录 
注 册
Please add them to the annotationProcessor configuration. - butterknife-5.1.1.jar android studio 3.0错误
发布时间: 2018-01-15
浏览次数: 783
发布人:
  
东川供求信息
  •      Error:Execution failed for task ':aT:javaPreCompileDebug'.
    > Annotation processors must now be declared explicitly. The following dependencies in the compile classpath are found to contain annotation processors. Please add them to the annotationProcessor configuration.
    - butterknife-5.1.1.jar
    Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with the previous behavior. Note that this option is deprecated and will be removed in the future.
    See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.

    经过排查,发现是Gradle引发的异常,这里大体说明下:

    新的 gradle 插件不再支持 annotation processors,如果需要使用需要显式声明
    So,解决办法如下:

    defaultConfig {
    ...
    ndk {
    // 设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的so)
    abiFilters "armeabi", "arm64-v8a"
    }
    javaCompileOptions {
    // 显式声明支持注解
    annotationProcessorOptions {
    includeCompileClasspath false
    }
    }
    }

  • 请说在东川区供求信息网看到此信息
CopyRight © 2014-2022 昆明英信科技有限公司 All Rights Reserved    滇ICP备14006165号-1
滇公网安备 53011302530117号