Skip to content
This repository was archived by the owner on Sep 4, 2021. It is now read-only.
This repository was archived by the owner on Sep 4, 2021. It is now read-only.

Execution failed for task ':react-native-geocoder:verifyReleaseResources'. #86

Open

Description

@vishalTechnoFreek

I getting this issue while create release apk.
Execution failed for task ':react-native-geocoder:verifyReleaseResources'.

com.android.ide.common.process.ProcessException: Failed to execute aapt

Activity

  1. kueda commented on Nov 20, 2018

    @kueda

    Getting something similar trying to run ./gradlew assembleRealse, Mac OS 10.12.6, Android SDK Build Tools 28.0.3, gradle 4.6, react-native 0.57.1, react-native-geocder 0.5.0:

    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':react-native-geocoder:verifyReleaseResources'.
    > java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
      Output:  /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:7: error: resource android:attr/colorError not found.
      /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:11: error: resource android:attr/colorError not found.
      /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
      /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/res/merged/release/values/values.xml:226: error: resource android:attr/fontStyle not found.
      /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/res/merged/release/values/values.xml:226: error: resource android:attr/font not found.
      /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/res/merged/release/values/values.xml:226: error: resource android:attr/fontWeight not found.
      error: failed linking references.
      
      Command: /Users/username/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/e7c06e161e039ba7b8bbf8be2b64c8b8/aapt2-3.2.1-4818971-osx/aapt2 link -I\
              /Users/username/Library/Android/sdk/platforms/android-25/android.jar\
              --manifest\
              /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/aapt_friendly_merged_manifests/release/processReleaseManifest/aapt/AndroidManifest.xml\
              -o\
              /var/folders/qn/0_w8cr513wl215grz8mv_6980000gn/T/aapt-5569752529559728845-out\
              -R\
              /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/res/compiled/release/anim_abc_fade_in.xml.flat\
    

    I'm pretty new to RN so my apologies if this is something obvious and/or generic, but it seems specific to react-native-geocoder.

  2. RafilAlArs commented on Nov 23, 2018

    @RafilAlArs

    Getting thesame when run ./gradlew assembleRealse, Mac OS 10.12.6, Android SDK Build Tools 28.0.3
    FAILURE: Build failed with an exception. any solution.

    • What went wrong:
      Execution failed for task ':react-native-geocoder:verifyReleaseResources'.

    java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
    Output: /Users/rafilalars/Desktop/Mobile Apps/React Native/PrayerTimeV2/node_modules/react-native-geocoder/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:7: error: resource android:attr/colorError not found.
    /Users/rafilalars/Desktop/Mobile Apps/React Native/PrayerTimeV2/node_modules/react-native-geocoder/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:11: error: resource android:attr/colorError not found.
    /Users/rafilalars/Desktop/Mobile Apps/React Native/PrayerTimeV2/node_modules/react-native-geocoder/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found.

    update
    when I change the react-native-geocoder project build.gradle to
    apply plugin: 'com.android.library'

    android {
    compileSdkVersion 26
    buildToolsVersion "25.0.2"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    

    }

    dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation "com.facebook.react:react-native:+"
    }
    change compileSdkVersion 25 to 26 and targetSdkVersion 26 let me build release this solve the problem.

  3. luisfuertes commented on Feb 26, 2019

    @luisfuertes

    +1.

    Change targetSdkVersion and compileSdkVersion to 26 not work for me.

    Ok, my project is in target SDK 28, with 28 version it works. But in other issue post this fix:

    android/build.gradle

    At end add:

    subprojects {
        afterEvaluate {project ->
            if (project.hasProperty("android")) {
                android {
                    compileSdkVersion rootProject.ext.compileSdkVersion
                    buildToolsVersion rootProject.ext.buildToolsVersion
                }
            }
        }
    }
    
  4. ad7090 commented on Sep 10, 2019

    @ad7090

    I find The solution Finally ;)))))
    ((( RN )))
    When we get verifyReleaseResources And ':react-native-interactable:compileDebugJavaWithJavac' this message Error in Release Apk Build In Android

    just Update build.gradle in Lib Npm

    And Upgrade Your LibSource

    android {
    compileSdkVersion 28 <<=== this line (to Current SDK Project)

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 28   <<=== this line (to Current SDK Project)
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    

    }

  5. DeVoresyah commented on Apr 28, 2020

    @DeVoresyah

    +1.

    Change targetSdkVersion and compileSdkVersion to 26 not work for me.

    Ok, my project is in target SDK 28, with 28 version it works. But in other issue post this fix:

    android/build.gradle

    At end add:

    subprojects {
        afterEvaluate {project ->
            if (project.hasProperty("android")) {
                android {
                    compileSdkVersion rootProject.ext.compileSdkVersion
                    buildToolsVersion rootProject.ext.buildToolsVersion
                }
            }
        }
    }
    

    works for me

  6. Danushka50 commented on Apr 5, 2021

    @Danushka50

    +1.

    Change targetSdkVersion and compileSdkVersion to 26 not work for me.

    Ok, my project is in target SDK 28, with 28 version it works. But in other issue post this fix:

    android/build.gradle

    At end add:

    subprojects {
        afterEvaluate {project ->
            if (project.hasProperty("android")) {
                android {
                    compileSdkVersion rootProject.ext.compileSdkVersion
                    buildToolsVersion rootProject.ext.buildToolsVersion
                }
            }
        }
    }
    

    This works for me. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions