如何使用Android Studio 3.5和3.5.0 gradle修复Android Annotations 4.6.0编译 [英] how to fix Android Annotations 4.6.0 compile with android Studio 3.5 and 3.5.0 gradle

查看:1923
本文介绍了如何使用Android Studio 3.5和3.5.0 gradle修复Android Annotations 4.6.0编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Android Studio更新至3.5,但是使用android注释时出现了问题

I updated Android studio to 3.5 but there is a problem when I use android annotations

Gradle may disable incremental compilation as the following annotation processors are not incremental: jetified-androidannotations-4.6.0.jar (org.androidannotations:androidannotations:4.6.0).
Consider setting the experimental feature flag android.enableSeparateAnnotationProcessing=true in the gradle.properties file to run annotation processing in a separate task and make compilation incremental

我已将android.enableSeparateAnnotationProcessing = true放入gradle.properties文件中

I've put android.enableSeparateAnnotationProcessing=true in the gradle.properties file

但是可以说

信息:选项设置'android.enableSeparateAnnotationProcessing = true'是实验性的,不受支持. 当前默认值为"false".

INFO: The option setting 'android.enableSeparateAnnotationProcessing=true' is experimental and unsupported. The current default is 'false'.

找不到AndroidManifest.xml文件

Could not find the AndroidManifest.xml file

推荐答案

我遇到了几乎相同的问题,并且在将android studio和gradle更新为3.5之后无法构建我的应用程序,但是根据

I had almost the same problem and couldn't build my app after updating android studio and gradle to 3.5 but according to this answer I added this to my defaultConfig{} in app gradle and problem solved!

javaCompileOptions {
        annotationProcessorOptions {
            arguments = [
                    "androidManifestFile": "$projectDir/src/main/AndroidManifest.xml".toString()
            ]
        }
    }

这篇关于如何使用Android Studio 3.5和3.5.0 gradle修复Android Annotations 4.6.0编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆