Androidannotations + Android Studio(几乎可以使用) [英] Androidannotations + Android Studio ( almost working )
问题描述
这是我要解决的问题.如何使用Gradle或Maven编译两者并不使用运行
This is something I'm trying to figure out. How do you make both run without using Gradle or Maven to compile the source files.
有效的方法: 我已完成以下步骤:
What works: I've done the following steps:
- 为Android Studio设置注释处理器,使其指向androidannotations-2.7.1
- 在我的项目的模块中添加了一个名为androidannotations-api-2.7.1的新库
我可以说它是可行的,因为当我按下Alt + Enter时,Android Studio会自动为我执行正确的导入.
I can tell it works because Android Studio automatically does the right imports for me when I press Alt+Enter.
问题::在编译过程中,我收到以下消息:
Problem: during compilation I get the following message:
意外错误.请报告有关AndroidAnnotations的问题, 以下内容:java.lang.IllegalStateException:找不到 AndroidManifest.xml文件,从路径上移 [/home/user/Work/FailAnnotationTryProject/build/classes/production/main/generated] 使用伪文件发现 [file:///home/user/Work/FailAnnotationTryProject/build/classes/production/main/generation/dummy1382376292025.java] (最大尝试次数:10)
Unexpected error. Please report an issue on AndroidAnnotations, with the following content: java.lang.IllegalStateException: Could not find the AndroidManifest.xml file, going up from path [/home/user/Work/FailAnnotationTryProject/build/classes/production/main/generated] found using dummy file [file:///home/user/Work/FailAnnotationTryProject/build/classes/production/main/generated/dummy1382376292025.java] (max atempts: 10)
我已经检查了我的方面->清单文件路径,它是正确的.
I have checked my Facets -> Manifest file path and it is right.
有人有任何建议或更好的解决方案吗?
Has someone got any suggestion or better a solution?
推荐答案
我也遇到了同样的问题,并通过将Settings-> Compiler-> Annotation Processors->"Store related related to:"生成的源更改为"Model content root"解决了.
I faced with same problem and fixed it by changing Settings->Compiler-> Annotation Processors->"Store generated sources relative to:" to "Model content root".
我希望它会有所帮助.
这篇关于Androidannotations + Android Studio(几乎可以使用)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!