Andy
Andy

Reputation: 27

Execution failed for task ':app:processDebugResources'. Gradle Build Failed

Facing Errors on my Gradle build in Android Studio. Where do I need to change the code to fix the issue?

This is my project build.gradle

buildscript {
    repositories {
        jcenter{ url "http://jcenter.bintray.com/"}
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
        classpath 'com.google.gms:google-services:4.2.0'



        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
        maven {
            url "https://maven.google.com"
        }
        google()

    }

}


task clean(type: Delete) {
    delete rootProject.buildDir
}

this is my app build.gradle

apply plugin: 'com.android.application'
android {
    compileSdkVersion 26
     defaultConfig {
        applicationId "com.atmajaa.adda"
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        vectorDrawables.useSupportLibrary = true
        resConfigs "auto"
        manifestPlaceholders = [onesignal_app_id               : "01bab543-cce8-4e36-a755-6bc23fd66b7c",
                                // Project number pulled from dashboard, local value is ignored.
                                onesignal_google_project_number: "REMOTE"]
        multiDexEnabled true
        dexOptions {
            preDexLibraries = false
            javaMaxHeapSize "4g"
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {

        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')

    implementation('com.mikepenz:fastadapter:2.6.3@aar') {
        transitive = true
    }
    implementation 'com.android.support:appcompat-v7:26.0.2'
    implementation 'com.android.support:cardview-v7:26.0.2'
    implementation 'com.android.support:support-v4:26.0.2'
    implementation 'com.android.support:animated-vector-drawable:26.0.2'
    implementation 'com.android.support:design:26.0.2'
    implementation 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'com.synnapps:carouselview:0.1.4'
    implementation 'com.mikepenz:fastadapter-commons:2.6.3@aar'
    implementation 'com.mikepenz:fastadapter-extensions:2.6.3@aar'
    implementation 'com.miguelcatalan:materialsearchview:1.4.0'
    implementation 'org.jsoup:jsoup:1.10.3'
    implementation 'com.thefinestartist:finestwebview:1.2.7'
    implementation 'com.github.chrisbanes:PhotoView:1.3.1'
    implementation 'com.fnp:material-preferences:0.1.4'
    implementation 'com.thebluealliance:spectrum:0.7.1'
    implementation 'com.firebaseui:firebase-ui-auth:2.3.0'
    implementation 'com.google.firebase:firebase-core:17.0.0'
    implementation 'com.google.firebase:firebase-crash:16.2.1'
    implementation 'com.google.firebase:firebase-invites:17.0.0'
    implementation 'com.google.firebase:firebase-ads:18.0.0'
    implementation 'com.google.firebase:firebase-auth:18.0.0'
    implementation 'com.google.android.gms:play-services-auth:17.0.0'
    implementation 'com.onesignal:OneSignal:3.10.9'
    implementation 'com.android.support:multidex:1.0.3'
    // Required only if Facebook login support is required
    implementation('com.facebook.android:facebook-android-sdk:4.22.1')

    // Required only if Twitter login support is required
    implementation("com.twitter.sdk.android:twitter-core:3.0.0@aar") { transitive = true }
}
apply plugin: 'com.google.gms.google-services'

FAILURE: Build failed with an exception.

Upvotes: 2

Views: 1713

Answers (2)

Andy
Andy

Reputation: 27

Now getting error on this line:

Now getting error on this line

Upvotes: 0

SaadAAkash
SaadAAkash

Reputation: 3193

In your App-level build.gradle, I can see you've used resConfigs "auto" :

apply plugin: 'com.android.application'
android {
    compileSdkVersion 26
     defaultConfig {
        applicationId "com.atmajaa.adda"
        minSdkVersion 16
        targetSdkVersion 26
        ...
        resConfigs "auto"
        ...
     }
}

Use the following code instead of auto, as mentioned in this documentation reference link and define/limit your language resources to whichever languages you prefer:

android {
    defaultConfig {
        ...
        resConfigs "en"
    }
}

Upvotes: 1

Related Questions