Android Studio Frame Build: Add note frame annotations

Source: Internet
Author: User

Referring to the demo on GitHub, after creating a new project, there will be a local build.gradle file located under the App folder and a global build.gradle file located under the root directory project, and we are going to modify the local Gradle file:

1 Buildscript {2 Repositories {3 mavencentral ()4     }5 Dependencies {6         //Replace with the current version of the Android plugin7Classpath ' com.android.tools.build:gradle:1.0.0 '8         //The latest version of the ANDROID-APT plugin9Classpath ' com.neenbedankt.gradle.plugins:android-apt:1.4 'Ten     } One } A  - Repositories { - mavencentral () the mavenlocal () - } -  -Apply plugin: ' Com.android.application ' +Apply plugin: ' Android-apt ' -def aaversion = ' 3.3-snapshot '//your desired version, for example the latest stable:3.2 +  A Dependencies { atApt "org.androidannotations:androidannotations: $AAVersion" -Compile "Org.androidannotations:androidannotations-api: $AAVersion" - } -  - Apt { - arguments { inAndroidmanifestfile variant.outputs[0].processresources.manifestfile -         //If you had multiple outputs (when using splits), you could want to has the other index than 0 to          +Resourcepackagename ' Org.androidannotations.gradle ' -  the         //If you ' re using Android NBS flavors should use the following line instead of hard-coded PackageName *         //resourcepackagename Android.defaultConfig.packageName $ Panax Notoginseng         //You can set optional annotation processing options here, like these commented options: -         //logLevel ' INFO ' the         //logFile '/var/log/aa.log ' +     } A } the  + Android { -Compilesdkversion 19 $Buildtoolsversion "21.1.1" $  - Defaultconfig { -Minsdkversion 9 theTargetsdkversion 19 -     }Wuyi}


Finally, add _ (underline) after the name of the activity in the Androidmanifest.xml.

Then compile the project to complete! If the error, please compile several times. Compile button:

My smooth compilation passed. Reference Blog: http://blog.csdn.net/ljphhj/article/details/37601173

Android Studio Frame Build: Add note frame annotations

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.