Execution failed for task ':react-native-youtube:verifyReleaseResources'

Viewed 2978

While making build of react native app I get the following error. * What went wrong: Execution failed for task ':react-native-youtube:verifyReleaseResources'.

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

And after this the build is failed.Why this came and what is the possible solution for this problem?

2 Answers

Reason for the error:

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

Solution

  1. Navigate to node_modules/react-native-youtube/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.
Related