Getting "verifyReleaseResources" error after upgrading React Native

You need to add following code in your project's android/build.gradle:

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

For me, what fixed the issue was prefixing with app

./gradlew app:assembleRelease

Reason for the error:

You have installed react-native-document-picker as a dependency, And the reason for this error is that the configurations of your android/app/build.gradle and node_modules/react-native-document-picker/android/build.gradle mismatch.

Solution

  1. Navigate to node_modules/react-native-document-picker/android/build.gradle
  2. Edit and keep the compileSdkVersion buildToolsVersion minSdkVersion targetSdkVersion same as you have in android/app/build.gradle
  3. Sync the project again.
  4. Run ./gradlew assembleRelease from the terminal.