Не удалось выполнить задачу «: app: processDebugResources». Сбой сборки Gradle - PullRequest
2 голосов
/ 19 июня 2019

Обнаружены ошибки на моей сборке Gradle в Android Studio. Где мне нужно изменить код, чтобы исправить проблему?

Это мой проект 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
}

это мое приложение 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: сборка не удалась, исключение.

  • Что пошло не так:

    Не удалось выполнить задачу ': app: processDebugResources'.

    Не удалось связать ресурс Android ошибка: неверная конфигурация 'auto' для опции -c.

Ответы [ 2 ]

1 голос
/ 19 июня 2019

На вашем уровне приложения build.gradle я вижу, что вы использовали resConfigs "auto":

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

Используйте следующий код вместо auto, как упомянуто в этой документации укажите ссылку и определите / ограничьте свои языковые ресурсы тем языком, который вы предпочитаете:

android {
    defaultConfig {
        ...
        resConfigs "en"
    }
}
0 голосов
/ 19 июня 2019

Теперь получаем ошибку в этой строке:

Now getting error on this line

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...