会员登录 - 用户注册 - 设为首页 - 加入收藏 - 网站地图 Nginx   Redis   Python手册   Hadoop   Memcache
当前位置:首页 > LINUX技术 > 正文

AndroidStudio 3.0 canary 8 Annotation processors must be exp

时间:2017-10-28 22:47 来源:未知 作者:admin 阅读:

今天由于开发环境问题,下载了最新版的AndroidStudio的,之前的项目编译报错,提示:


Error:Execution failed for task ':app:javaPreCompileDebug'.
> 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.
    - permissionsdispatcher-processor-2.3.1.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.
  See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

在project/app/build.gradle的android{defaultConfig{}}中添加:

build.gradle

    apply plugin: 'com.android.application'

    ....
    androdi{
                defaultConfig{
                ....
                ...
                javaCompileOptions {
                annotationProcessorOptions {
                    includeCompileClasspath true
                }
        }
    }
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15

—————————-2017年7月26日15:50:07————————————-

    Information:Gradle tasks [:app:assembleBaiduDebug]
C:\Users\Vincent\.gradle\caches\transforms-1\files-1.1\imagepicker-0.5.5.aar\2783c71f1a32429aa98ba1cbe71dc0ae\res\values\values.xml
Error:(22, 5) style attribute '@android:attr/windowEnterAnimation' not found
Error:(22, 5) style attribute '@android:attr/windowExitAnimation' not found
Error:(31, 5) style attribute '@android:attr/windowEnterAnimation' not found
Error:(31, 5) style attribute '@android:attr/windowExitAnimation' not found
Error:E:\MyProject\Hss\app\build\intermediates\incremental\mergeBaiduDebugResources\merged.dir\values\values.xml:1862 style attribute '@android:attr/windowEnterAnimation' not found
Error:E:\MyProject\Hss\app\build\intermediates\incremental\mergeBaiduDebugResources\merged.dir\values\values.xml:2545 style attribute '@android:attr/windowEnterAnimation' not found
Error:failed linking references
Error:java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.AaptException: AAPT2 link failed:
Error:com.android.builder.internal.aapt.AaptException: AAPT2 link failed:
Error:Execution failed for task ':app:processBaiduDebugResources'.
> Failed to execute aapt
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

解决方案: 关掉AAPT2即可 在Project/gradle.properties中添加 android.enableAapt2=false

    android.enableAapt2=false
  • 1

这里写图片描述

——————–2017年7月27日09:49:33——–

(责任编辑:admin)

顶一下
(0)
0%
踩一下
(0)
0%
上一篇:Python csv模块的使用
下一篇:没有了
推荐内容
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
¹رÕ/a>