• Android Studio 3.0+ Annotation processors must be explicitly declared now


    把Android Studio 升级到3.0+ 版本的时候出现该问题:

     
    可以看到 给了我们两种解决办法:
     
    1、
    即 给出现问题的三方 加上 annotationProcessor配置
     
     
    2
     
     在相应的module的gradle文件中,使用javaCompileOptions
    defaultConfig {
            applicationId "com.xxx.xxx"
            minSdkVersion 15
            targetSdkVersion 26
            versionCode 1
            versionName "1.0"
            
            //添加了javaCompileOptions 
            javaCompileOptions {
                annotationProcessorOptions {
                    includeCompileClasspath = true
                }
            }
        }

    注意,该解决方案后面还有一句话:

    翻译一下:注意该方法在未来可能会被抛弃
     
    也就是说 推荐使用第一种方法来解决该问题。
     
     
  • 相关阅读:
    2019年计划书单
    redis 分布式锁实现
    filter-grok,dissect匹配数据
    nohup-长期运行进程
    filter
    kill
    watch
    free
    jar
    tree
  • 原文地址:https://www.cnblogs.com/xqxacm/p/10265617.html
Copyright © 2020-2023  润新知