[AndroidAnnotations framework] configuration of AndroidAnnotations

Source: Internet
Author: User

[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-*.jarAnd androidannotations-*.jar. Import the jar package to the project. androidannotations-api-*.jarPlaced in the project libsDirectory, create a directory under the project directory compile-libs, Set androidannotations-*.jarPut in compile-libsDirectory. 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-libsDirectory androidannotations-*.jarAnd then click OK.

Then you can start using the framework ~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.