Android的工作室:使用AndroidAnnotations [英] Android Studio: Use AndroidAnnotations

查看:159
本文介绍了Android的工作室:使用AndroidAnnotations的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我想尝试新的Andr​​oid Studio和进口我的Eclipse项目(我生成的摇篮构建文件)。曾为pretty的好。

So I wanted to try the new Android Studio and imported my eclipse projects (I generated a gradle build file). Worked pretty good.

这似乎并没有工作,唯一库是AndroidAnnotations。 我选择在文件的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.

由于生产源目录我选择了根。 但不会产生像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...

<一个href="http://www.ashokgelal.com/2012/12/setting-up-intellij-idea-12-with-maven-actionbarsherlock-roboelectric-androidannotations/">http://www.ashokgelal.com/2012/12/setting-up-intellij-idea-12-with-maven-actionbarsherlock-roboelectric-androidannotations/

...上述职位将引导您完成设置不同库中的IntelliJ,滚动向底部为AA。

...the above post walks you through setting up various libs in intelliJ, scroll towards the bottom for AA.

主要的事情,我必须这样做,我没有做蚀是去preferences>编译器>注释处理器并设置我的处理器路径,类似的...

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...

[PATH TO AA JARS] /androidannotations-2.7.jar:[PATH TO AA   JARS] /androidannotations-api-2.7.jar:[PATH TO AA   JARS] / codemodel-2.4.1.jar

[PATH TO AA JARS]/androidannotations-2.7.jar:[PATH TO AA JARS]/androidannotations-api-2.7.jar:[PATH TO AA JARS]/codemodel-2.4.1.jar

这篇关于Android的工作室:使用AndroidAnnotations的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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