React-native-branch-deep-linking-attribution: Execution failed for task

Created on 13 Aug 2018  路  4Comments  路  Source: BranchMetrics/react-native-branch-deep-linking-attribution

Hi! I'm currently experiencing errors while building release version of android app. I didn't touch anything related to react-native-branch.

* What went wrong:
Execution failed for task ':react-native-branch:verifyReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 2s
402 actionable tasks: 379 executed, 23 up-to-date

react-native-branch: 2.3.0 and 2.3.3
react-native: 0.56.0
react: 16.4.1

Is this already compatible with react native 0.56 version?

Most helpful comment

@jandrell-formoso Have a look at https://github.com/react-community/react-native-image-picker/issues/882#issuecomment-405255785

Forcing Gradle to build everything with the same main project SDK seems to be working.

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

All 4 comments

Same error with additional logs :

:react-native-branch:verifyReleaseResources/Users/bob/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/91253b2fa6daf90824391fa07107cfbe/res/values-v24/values-v24.xml:3:5-157: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

/Users/bob/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/91253b2fa6daf90824391fa07107cfbe/res/values-v24/values-v24.xml:4:5-135: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

/Users/bob/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/91253b2fa6daf90824391fa07107cfbe/res/values-v26/values-v26.xml:13:5-16:13: AAPT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.

/Users/bob/code/node_modules/react-native-branch/android/build/intermediates/res/merged/release/values-v24/values-v24.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

/Users/bob/code/node_modules/react-native-branch/android/build/intermediates/res/merged/release/values-v24/values-v24.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

/Users/bob/code/node_modules/react-native-branch/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:15: error: Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.


 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-branch:verifyReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

The thing is I have android.enableAapt2=false in gradle.properties

@jandrell-formoso Have a look at https://github.com/react-community/react-native-image-picker/issues/882#issuecomment-405255785

Forcing Gradle to build everything with the same main project SDK seems to be working.

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

Great! It works thanks!

Confirmed for React Native 0.57

Was this page helpful?
0 / 5 - 0 ratings