Task :app:createBundleReleaseJsAndAssets FAILED in gradle-8.2 and java version 18

116 Views Asked by At

I am getting this issue in running the release build of the app. In debug mode it is working fine.

Configure project :react-native-vision-camera VisionCamera: node_modules/ found at: Users/sampleuser/Documents/GitHub/sampleProject/node_modules VisionCamera: Building with Hermes... VisionCamera: Frame Processors are disabled because Reanimated 3.5.0+ is not installed. C++ part will not be built. WARNING: DSL element 'dexOptions' is obsolete and should be removed. It will be removed in version 8.0 of the Android Gradle plugin. Using it has no effect, and the AndroidGradle plugin optimizes dexing automatically.

Task :app:createBundleReleaseJsAndAssets FAILED

FAILURE: Build failed with an exception.

  • What went wrong: A problem was found with the configuration of task ':app:createBundleReleaseJsAndAssets' (type 'BundleHermesCTask').
    • Gradle detected a problem with the following location: '/Users/sampleuser/Documents/GitHub/sampleProject/android/app/build/generated/res/react/release'.

      Reason: Task ':app:mergeReleaseResources' uses this output of task ':app:createBundleReleaseJsAndAssets' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

      Possible solutions:

      1. Declare task ':app:createBundleReleaseJsAndAssets' as an input of ':app:mergeReleaseResources'.
      2. Declare an explicit dependency on ':app:createBundleReleaseJsAndAssets' from ':app:mergeReleaseResources' using Task#dependsOn.
      3. Declare an explicit dependency on ':app:createBundleReleaseJsAndAssets' from ':app:mergeReleaseResources' using Task#mustRunAfter.

      For more information, please refer to https://docs.gradle.org/8.2/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

0

There are 0 best solutions below