Skip to content

Can't build after updating to RN 56 - Execution failed for task ':react-native-photo-view:verifyReleaseResources' #166

@ds8k

Description

@ds8k

I'm unable to generate a release build after upgrading to React Native 56:

:react-native-photo-view:verifyReleaseResources/Users/user/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/d966a29d4964b9817b018d8a3a1d16a4/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/user/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/d966a29d4964b9817b018d8a3a1d16a4/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/user/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/d966a29d4964b9817b018d8a3a1d16a4/res/values-v26/values-v26.xml:13:5-16:13: AAPT: 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-photo-view:verifyReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

Looks like compileSdkVersion, buildToolsVersion, and targetSdkVersion in build.gradle need to be updated. They're pointing to old versions right now:

android {
    compileSdkVersion 23
    buildToolsVersion "25.0.0"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 1
    }
    lintOptions {
        abortOnError false
    }
}

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