Android的注解与Android工作室 [英] Android Annotations with android studio

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

问题描述

我一直在试图让Android的注释工作在Android工作室v0.8.14随着Android的注解3.1。但是,由于某种原因,它不是产生所需的文件。有人点我到正确的文件或步骤,我需要得到一个项目成立。

I've been trying to get Android Annotations working on Android Studio v0.8.14 along with Android Annotations 3.1. But for some reason it's not generating the required files. Can someone point me to the right documentation or steps I need to get a project set up.

我环顾四周,似乎没有任何固体。

I've looked around, nothing seems solid.

推荐答案

创建根和应用程序build.gradle这样的:

Create root and app build.gradle like:

https://gist.github.com/Pierry/b3eab411c8865573b985

在活动中,这个注释与 @EActivity(R.layout.activity_my),并在类路径中添加库(Android的工作室自动进行),(右键)。

In activity, annotate this with @EActivity(R.layout.activity_my), and add library in your classpath (Android studio make automatically), (Right click).

在活动名称添加您的清单_

Add in your manifest _ after activity name.

请注意:当u改变一切的buidle.gradle,通常会被删除:

Note: when u change everything in buidle.gradle, usually the line is removed:

compile "org.androidannotations:androidannotations-api:$AAVersion"

您需要重新添加。 验证始终。

You need add it again. Verify always.

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

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