Android gradle Configuration

Source: Internet
Author: User
Tags constant definition

Solve the problem
    • Error: Could not find the Androidmanifest.xml file, going up from path
    • Open build.gradle the app file and add the following code
      /*** AA Annotations Apt configuration */apt {    arguments {        androidmanifestfile variant.processResources.manifestFile        Resourcepackagename apppackagename    }}

        


    • Error: Could not find property ' processresources ' 1.
    • Open the global file and build.gradle add the following code
      Classpath ' COM.ANDROID.TOOLS.BUILD:GRADLE:1.0.0-RC1 '//replace classpath ' com.android.tools.build:gradle:0.14.2 '

        


Build.gradle Full Source

First step, open the file in app Moder build.gradle

/** * Constant definition */def apppackagename = "Com.apkdemo.demo"; /* Package Name: Must change the current package name */def Appsigningkey = "/users/oscar/desktop/testapkkey/gradledemo.jks"; /* APK signature key file directory */def Storepassword = "123123"/* APK signature key password (first password) */def Keyalias = ' 123321 '/** apk signature key alias */def KEYP Assword = "123123"/* APK signature key alias password (second password) */apply plugin: ' com.android.application ' Apply plugin: ' Com.neenbedankt.android-apt ' Android {compilesdkversion buildtoolsversion "20.0.0" Defaultconfig {ApplicationID  AppPackageName minsdkversion targetsdkversion versioncode 1 Versionname "1.0"} compileoptions {sourceCompatibility Javaversion.version_1_7 targetcompatibility Javaversion.version_1_7} buildtypes {release {minifyEnabled false Proguar Dfiles getdefaultproguardfile (' proguard-android.txt '), ' Proguard-rules.pro '}}}/** * aa annotation apt config */apt {arguments {Andro Idmanifestfile variant.processResources.manifestFile resourcepackagename apppackagename}}/** * Exclude */android { packagingoptions {exclude ' meta-inf/license.txt ' }}/** *. So file import */task copynativelibs (type:copy) {from Filetree (dir: ' Libs ', include: ' armeabi/*.so ') into ' build/lib ' From Filetree (dir: ' Libs ', include: ' armeabi-v7a/*.so ') to ' Build/lib ' from Filetree (dir: ' Libs ', include: ' x86/*.so ') Into ' build/lib '}/** * Support library */dependencies {compile filetree (dir: ' Libs ', include: [' *.jar ']) compile ' com.android.support : appcompat-v7:21.0.0 '//Frame series apt ' org.androidannotations:androidannotations:3.2+ '//AA Note Library 1 compile ' org.androidannotations:androidannotations-api:3.2+ '//AA Note Library 2////Request series//compile ' com.loopj.android: android-async-http:1.4.5+ '//android Asynchronous HTTP request////Animation series//Compile ' com.nineoldandroids:library:2.4.0+ '//nine old Androids Android 3.0 (Honeycomb) All animation API compatible to android1.0////cache series//compile ' com.squareup.picasso:picasso:2.3.3 '// Picasso picture Cache////Control series////compile ' com.github.dmytrodanylyk.android-process-button:library:1.0.1 '//button displays progress status. (minimum required andriud version)////compile ' de.hdodenhof:circleimageview:1.1.1 '//circleimageview to achieve a framed round head.////CoMpile ' com.daimajia.numberprogressbar:library:[email protected] '//numberprogressbar text progress follows the progress bar display. (minimum required andriud version)////compile ' info.hoang8f:fbutton:1.0.5 '//fbutton Fbutton is the concept of Android with "Flat UI" custom button. (Minimum required Andriud version 9)////compile ' pl.droidsonroids.gif:android-gif-drawable:1.0.+ '//with JNI implementation,////compile ' com.nhaarman.supertooltips:library:3.0.+ '//supertooltips led painting effect tips show////compile ' org.holoeverywhere:slidingmenu : 1.4.2+ '//slidingmenu (dependent actiomnbar) slide-out menu, slide the menu by dragging the edge of the screen.///tools//Compile ' com.alibaba:fastjson:+ '//fastjson Currently faster JSON parsing library}

Second step, open project space global file build.gradle copy the following

Buildscript {repositories {mavencentral ()} dependencies {classpath ' com.neenbedankt.gradle.plugins:android-apt:1.4 ' Classpath ' com.android.tools.build:gradle:0.14.2 '}}allprojects {repositories {mavencentral ()}}

  


Android gradle Configuration

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.