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

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

Open
vishalTechnoFreek opened this issue Nov 14, 2018 · 6 comments

Comments

@vishalTechnoFreek
Copy link

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

@kueda
Copy link

kueda commented Nov 20, 2018

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.

@RafilAlArs
Copy link

RafilAlArs commented Nov 23, 2018

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.

@luisfuertes
Copy link

luisfuertes commented Feb 26, 2019

+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
            }
        }
    }
}

@ad7090
Copy link

ad7090 commented Sep 10, 2019

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"
    }
}

}

@DeVoresyah
Copy link

+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

@Danushka50
Copy link

+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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants