1. Download the relevant Jar package (: HTTPS://REPO1.MAVEN.ORG/MAVEN2/ORG/ANDROIDANNOTATIONS/ANDROIDANNOTATIONS-BUNDLE/3.3.1/ Androidannotations-bundle-3.3.1.zip)
2. Configure Eclipse to import Androidannotations-api-3.3.1.jar under Libs and add the Compile-lib folder to the Eclipse project, where you put: Androidannotations-3.3.1.jar
Still need to set the annotation compilation Jar in the project (now the eclipse bundle hits Java Compiler cannot find Annotation Processin is due to the lack of plug-ins, the plugin address and installation name are as follows:
Juno-http://download.eclipse.org/release/juno Eclipse Java Development Tools in a set of plugins
3. Preliminary Android Annotations
@EActivity Label use:
1 Import org.androidannotations.annotations.EActivity;
2Importandroid.app.Activity;
3ImportAndroid.os.Bundle;
4@EActivity (R.layout.activity_main)
5 PublicclassMainactivityextendsActivity {
6
7@Override
8protectedvoidOnCreate (Bundle savedinstancestate) {
9 Super. OnCreate (Savedinstancestate);
Ten//Setcontentview (r.layout.activity_main);
One}
A }
To ensure that the program is running, you need to change mainactivity to: Mainactivity_ in Manifest***.xml
Run successfully.
Android Annotations Open Source Framework learning + eclipse (i)