The process "command" F: \ android-sdk \ build-tools \ 21.1.2 \ aapt.exe '' completed with a non-zero value of output 1

Here is the contents of my build.gradle file:

 // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { maven { credentials { username artifactoryUserName password artifactoryPassword } url 'http://test:8081/artifactory/libs-release-local' } mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:1.1.0' } allprojects { repositories { maven { credentials { username artifactoryUserName password artifactoryPassword } url 'http://test:8081/artifactory/libs-release-local' } mavenCentral() maven { url 'http://repo1.maven.org/maven2' } jcenter() } } 

Here is the contents of app\build.gradle :

  apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" lintOptions { abortOnError false } defaultConfig { applicationId "test.com" minSdkVersion 14 targetSdkVersion 21 versionCode 1 versionName "1.0" } signingConfigs { aseeConfig { storeFile file("test.keystore") storePassword "test123" keyAlias "AndroidKey" keyPassword "test123" } } buildTypes { release { signingConfig signingConfigs.aseeConfig minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } prod.initWith(buildTypes.release) prod { signingConfig signingConfigs.aseeConfig minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } } dependencies { //compile 'com.google.android:support-v4:r13' compile 'com.google.android:google-play-services:4.1.32' compile 'com.devsmart.android:devsmart-lib:1.0.0' compile 'com.jeremyfeinstein.slidingmenu.lib:sliding-menu:1.0.0' compile 'com.viewpagerindicator:viewpager-indicator:2.4.1' ///compile 'com.google.android.gms:google-play-services_lib:4.1.32' compile 'com.emilsjolander:sticky-list-headers:1.0.0' //compile 'com.actionbarsherlock:actionbar-sherlock:4.2.0' compile 'com.mobeta.android.dslv:drag-sort-list-view:0.6.1' compile 'com.threegvision.products:inigma_sdk_pro:3.24' compile 'org.afree:a-free-chart:1.0.0' compile 'org.afree:a-free-graphics:1.0.0' compile 'net.simonvt:datepicker:1.0' //compile 'eu.inmite:android-styled-dialogs:1.1' compile 'com.nineoldandroids:nine-old-androids:2.4.1' compile 'com.shinobicontrols.charts:shinobicharts:1.5.0-5' compile 'com.squareup.picasso:picasso:2.3.2' compile 'com.daimajia.slider:library: 1.1.5@aar ' compile 'com.github.bumptech.glide:glide:3.6.0' compile 'com.journeyapps:zxing-android-embedded: 3.0.1@aar ' compile 'com.google.zxing:core:3.2.0' compile 'com.squareup.retrofit:retrofit:1.9.0' compile fileTree(dir: 'libs', include: ['*.jar']) compile files('libs/actionbarsherlock-4.2.0.jar') compile files('libs/android-styled-dialogs-1.1.1-sources.jar') compile files('libs/android-support-4.0.jar') } 

I can not create my project. I get this error:

+5
source share
3 answers

I encountered such a problem once, but I don’t remember exactly how to fix it.
As I remember, I follow this link
It seems because there are many modules depending on the v4 lib difference support. So adding multiDexEnabled true may work.

Also try installing dependency of all modules with the same support version-v4. You can look at this link to learn how to exclude compilation v4 link1 link2 link3
If it still doesn’t work, try cleaning the project, restarting Studio, even restarting the computer (I don’t know why, but it worked for me once)

Hope this helps.

0
source

This is usually due to resource conflicts inside your modules. For example, in your application there are two ic_launcher.png (one from the module and one from your application)

I was looking for resource conflict checking, but I did not find an official solution.

I solve only in these ways, delete each module and check that it conflicts or not. This is the easiest way to solve. Hope this helps you.

Below is another suggestion ....

I also found this method, one person (I don’t remember the name) used safe deletion to check for conflict.

And some Q&A said to add multiDexEnabled: true . This config should increase the size of the dex file. You can also use the multidex support library .

The Exkable Dalvik specification limits the total number of methods that can be referenced in a single DEX file to 65,536, including Android framework methods, library methods, and methods in your own code. To overcome this limit, you must configure the application build process to create more than one DEX file, known as a multi-user configuration.

Here is the link for multiDex:
https://developer.android.com/tools/building/multidex.html

But the documentation says that you have to be careful to use this.

0
source

in the build.gradle file install compileSdkVersion 20.0.0 and buildToolsVersion "21.0.0

0
source

All Articles