Now Android studio popularity, Android development basically to abandon eclipse, recently using the Androidannotations annotation framework, the time to find some information slowly complete, here to you to share briefly:
First of all, gradle inside configuration can be provided according to the framework of the official website study, gradle configuration website address: https://github.com/excilys/androidannotations/wiki/ Building-project-gradle is here to make a brief description of it:
Three points: First add the following information to the global gradle file
Buildscript {
repositories {
Jcenter ()
Mavencentral ()//Add MAVEN Center Warehouse
}
dependencies {
Classpath ' com.android.tools.build:gradle:1.3.0 '
Classpath ' com.neenbedankt.gradle.plugins:android-apt:1.4 '//Add load Address
}
}
repositories {
Mavencentral ()//Add MAVEN Center Warehouse
Mavenlocal ()//Add local maven Repository
}
allprojects {
repositories {
Jcenter ()
}
}
Task Clean (type:delete) {
Delete Rootproject.builddir
}
Then the second step is to add the following information to the Gradle of the project app:
Apply plugin: ' Com.android.application '
Apply plugin: ' android-apt '//need to add
def aaversion = ' 3.3.2 '//need to be added to customize the version number according to the current version
Android {
Compilesdkversion 23
Buildtoolsversion "22.0.1"
Defaultconfig {
Minsdkversion 14
Targetsdkversion 23
Versioncode 1
Versionname "1.0"
}
Buildtypes {
Release {
Minifyenabled false
Proguardfiles getdefaultproguardfile (' proguard-android.txt '), ' Proguard-rules.pro '
}
}
}
dependencies {
Compile Filetree (include: [' *.jar '], dir: ' Libs ')
Testcompile ' junit:junit:4.12 '
Compile ' com.android.support:appcompat-v7:23.0.1 '
Compile ' com.android.support:design:23.0.1 '
Apt "org.androidannotations:androidannotations: $AAVersion"//needs to be added
Compile "ORG.ANDROIDANNOTATIONS:ANDROIDANNOTATIONS-API: $AAVersion"//needs to be added
}
Apt {//entire content needs to be added
arguments {
Androidmanifestfile Variant.outputs[0].processresources.manifestfile
}
}
When the final construction, if the speed is slow, you need to bring your own FQ, then in the configuration manifest file to change the name of the activity, at the end of the add an underscore _, if the error is compiled on the words can be!!!
The final configuration is so complete, the framework is really very convenient to use Yo ~ ~ ~ ~ ~ ~
Androidannotations Framework Configuration