My apps worked fine until some day I receive this message on Gradle Build.
Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
Error:Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException
This is my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "info.blacktrail.quinielacatamarca"
minSdkVersion 15
targetSdkVersion 23
versionCode 13
versionName "3.47"
multiDexEnabled true
}
buildTypes {
debug {
debuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.google.android.gms:play-services:9.0.2'
compile files('libs/jsoup-1.8.1.jar')
compile files('libs/htmlcleaner-2.16.jar')
}
apply plugin: 'com.google.gms.google-services'
I updated my Android Studio, I cleaned the project I rebuilded the project and the error still.
Any idea on how to resolve this?
Related
I'm using Jenkins to build my android application.
But I'm facing below error
FAILURE: Build failed with an exception.
What went wrong: Task 'clean' not found in root project 'ProjectName'.
Tried this solution but unable to solve my unable
Stackoverflow Solution
Below is my build.gradle
apply plugin: 'com.android.application'
apply plugin:'base'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.xyz.xxx"
minSdkVersion 15
targetSdkVersion 23
versionCode 12
versionName "1.0.2"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
dexOptions {
jumboMode true
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.3.0'
compile files('libs/guava-r09.jar')
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile project(':library')
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
}
Can anyone please tell me how do i fix this error:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '21.1.2'
defaultConfig {
applicationId "com.example.abhishek.detector"
minSdkVersion 10
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.google.android.gms:play-services-location:8.1.0'
}
Error:
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\hp-pc\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1
Install the latest version of the build tools. Adjust your build.gradle to use
`buildToolsVersion "23.0.2"`
or check and remove duplicate dependencies from list.
Enjoy :)
Change the sdk version from the values/string.xml
Here is mybuild.gradle file here I added jexcel.jar for my project after that is shows error
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.web03.bulkmessenger"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:multidex:1.0.0'
compile 'net.sourceforge.jexcelapi:jxl:2.6.3'
}
my error list is given below
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: jxl/biff/AutoFilter.class
Suddenly I could not build my projects with Android Studio by this following error. I have attached build.gradle file and SDK installation images, I have tried several hours but I could not get solved. Please help me to solve this problem.
Error:
Error:Execution failed for task ':qApp:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/node/Android/Sdk/build-tools/23.0.2/aapt'' finished with non-zero exit value 1
build.gradle file:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.+'
}
}
apply plugin: 'com.android.application'
android {
useLibrary 'org.apache.http.legacy'
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.qapp"
minSdkVersion 14
targetSdkVersion 21
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project(':facebookSDK')
compile project(':payPalDemo1')
compile project(':uberLibrary')
compile project(':bSLibrary')
compile project(':pullToRefresh')
compile project(':androidmapsutils')
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:multidex:1.0.0'
compile files('libs/android-async-http-1.4.6.jar')
compile files('libs/cardio.jar')
compile files('libs/UserFormValidation.jar')
}
SDK list
Try to add this inside you gradle file:
android {
useLibrary 'org.apache.http.legacy'
compileSdkVersion 23
.....
dexOptions {
javaMaxHeapSize "4g"
}
}
Try to add this lines in your dependencies:
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
And in the defaultConfig, use the same targetSdkVersion of the compileSdkVersion
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:+'
classpath 'com.jakewharton.hugo:hugo-plugin:1.1.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'hugo'
configurations {
preprocess
}
android {
compileSdkVersion 21
buildToolsVersion "21.0.2"
defaultConfig {
applicationId "uz.taxiapp.android"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
// make sure that lint errors don't fail the build as lint does not always work properly with the android gradle plugin
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:support-v4:$depAndroidSupportVersion"
compile "com.android.support:support-v13:20.0.+"
compile "com.android.support:appcompat-v7:$depAndroidSupportVersion"
compile 'com.google.android.gms:play-services:6+'
compile "com.android.support:recyclerview-v7:$depAndroidSupportVersion"
compile "com.j256.ormlite:ormlite-android:$depOrmLiteVersion"
compile "com.google.code.gson:gson:$depGsonVersion"
preprocess "com.squareup.dagger:dagger-compiler:$depDaggerVersion"
compile "com.squareup.dagger:dagger:$depDaggerVersion"
compile "com.squareup.picasso:picasso:$depPicassoVersion"
compile "com.squareup:otto:$depOttoVersion"
compile "com.squareup.retrofit:retrofit:$depRetrofitVersion"
preprocess "com.jakewharton:butterknife:$depButterKnifeVersion"
compile "com.jakewharton:butterknife:$depButterKnifeVersion"
compile "com.jakewharton.timber:timber:$depTimberVersion"
compile project (':JobQueue')
compile "com.jpardogo.googleprogressbar:library:$depGoogleProgressbarVersion"
compile 'com.iangclifton.android:floatlabel:1.0.1'}
android.applicationVariants.all { variant ->
//Where to place the generated code
variant.ext.set("gen_${variant.dirName}", file("${project.buildDir}/source/gen/${variant.dirName}"))
//Do the actual preprocessor things
variant.javaCompile.doFirst {
File out = variant.ext.get("gen_${variant.dirName}")
out.mkdirs()
variant.javaCompile.options.compilerArgs += [
'-processorpath', configurations.preprocess.getAsPath(),
'-s', out
]
}
}
This gradle code returns error
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Алексей\AppData\Local\Android\sdk\build-tools\21.0.2\aapt.exe'' finished with non-zero exit value 1
If you have installed Java 8, uninstall it completely install Java 7 by updating the environment variables.