问题描述
所以我想尝试新的 Android Studio 并导入我的 eclipse 项目(我生成了一个 gradle 构建文件).效果不错.
So I wanted to try the new Android Studio and imported my eclipse projects (I generated a gradle build file). Worked pretty good.
唯一似乎不起作用的库是 AndroidAnnotations.我在 File > Settings > Compiler > Annotation Processing 下选择了 androidannotations-2.7.jar 文件.
The only library which does not seem to work is AndroidAnnotations.I selected the androidannotations-2.7.jar file under File > Settings > Compiler > Annotation Processing.
作为生产源目录,我选择了gen".但是没有生成像 MainActivity_ 这样的生成文件.我做错了什么?
As production source directory i selected "gen".But the generated file like MainActivity_ are not generated. What did I wrong?
推荐答案
我遇到了同样的问题,按照说明使用 intelliJ 配置 aa,现在它就像一个魅力一样.
I had the same issues, followed the instructions for configuring aa with intelliJ, now it works like a charm does.
AA intelliJ 配置页面将指向这篇文章...
AA intelliJ config page will point you to this post...
...上面的帖子将引导您在 intelliJ 中设置各种库,向底部滚动 AA.
...the above post walks you through setting up various libs in intelliJ, scroll towards the bottom for AA.
我必须做的主要事情是我不必在 eclipse 中做的事情是转到 Preferences > Compiler > Annotation Processors 并将我的 Processor Path 设置为类似...
The main thing I had to do that I did not have to do in eclipse was go to Preferences > Compiler > Annotation Processors and set my Processor Path to something like...
[AA 罐子的路径]/androidannotations-2.7.jar:[AA 的路径罐子]/androidannotations-api-2.7.jar:[AA 路径罐子]/codemodel-2.4.1.jar
这篇关于Android Studio:使用 AndroidAnnotations的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!