[AndroidAnnotations framework] configuration of AndroidAnnotations
1. Configure androidannotations under AndroidStudio
First, prepare your project.
Androidannotations under AndroidStudio is easy to configure, you only need to configure two build. gradle.
Configurationbuild.gradle
(1) configurebuild.gradle
Add under buildscript> dependencies>
classpath'com.neenbedankt.gradle.plugins : android-apt : 1.4'
(2) configurebuild.gradle
1) Inapply plugin:'com.android.application'
Add a row
apply plugin: 'com.android.application'apply plugin: 'com.neenbedankt.android-apt'
2) define a version constant. The latest version is 3.3.2.
def AAVersion = '3.3.2'
3) add dependency
dependencies { apt "org.androidannotations : androidannotations : $AAVersion" compile "org.androidannotations : androidannotations-api : $AAVersion" }
4) add apt
apt { arguments { androidManifestFile variant.outputs[0].processResources.manifestFile } }
Then, build the project and you will be OK ~ 2. Configure androidannotations in eclipse to download the required jar package ., The latest version is 3.3.2. Decompress the package and get
androidannotations-api-*.jar
And
androidannotations-*.jar
. Import the jar package to the project.
androidannotations-api-*.jar
Placed in the project
libs
Directory, create a directory under the project directory
compile-libs
, Set
androidannotations-*.jar
Put in
compile-libs
Directory. Configure the project.
Step 1:Properties> Java Compiler> check the Enable project specific settiongs and set Compiler compliance level: 1.6
Step 2:PrZ success? Http://www.bkjia.com/kf/ware/vc/ "target =" _ blank "class =" keylink "> keys" "src =" http://www.bkjia.com/uploads/allimg/160311/041F95325-1.png "title =" \ "/>
Step 3:Properties> Java Compiler> Annotation Processing> Factory Path> check the Enable project specific settiongs, Add JARs-> browse the project directory, and select
compile-libs
Directory
androidannotations-*.jar
And then click OK.
Then you can start using the framework ~