Gradle Build Failed For Task app:processReleaseResources

后端 未结 8 1462
野趣味
野趣味 2020-12-20 15:04
apply plugin: \'com.android.application\'

android {
    compileSdkVersion 23
    buildToolsVersion \"22.0.1\"

    defaultConfig {
        applicationId \"com.nusec         


        
相关标签:
8条回答
  • 2020-12-20 15:43

    In my case it was a to long (more that 100 chars) name of a file in Assets

    0 讨论(0)
  • 2020-12-20 15:45

    For me the issue was being caused by a circular reference in an xml file. Lint would usually flag the issue, unless instructed not too. Check for:

    tools:ignore="ResourceCycle"
    
    0 讨论(0)
  • 2020-12-20 15:57

    In your build.gradle,

    applicationId "com.company.app"
    

    Should match in AndroidManifest.xml:

    package="com.company.app"
    

    I was getting this same error because they didn't match.

    0 讨论(0)
  • 2020-12-20 16:00

    Finally I got solution for this issue after going through so many articles.

    This issue is because of sdk tools Version mismatch.

    The targeted sdk version in build.gradle file must match with the sdk version which you installed.

    0 讨论(0)
  • 2020-12-20 16:01

    My solution came from here

    REMOVE ALL IMAGES FROM RES/ DRAWABLE THAT YOU DON'T NEED

    https://github.com/facebook/react-native/issues/19239

    Credit for --> ZeroCool00

    For those who are doing this before generating apk

    react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

    it generate unnecessary drawable images in drawable folder. so make sure to remove it and try again.

    android-> app -> src -> main -> res -> drawable

    0 讨论(0)
  • 2020-12-20 16:03

    After so much searching, I found this solution

    In android/gradle.properties add android.enableAapt2=false

    0 讨论(0)
提交回复
热议问题