While building react native app android build, build fails with the below error.
* What went wrong:
Execution failed for task ':app:minifyReleaseWithR8'.
> com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: /Users/builder/.gradle/caches/transforms-3/9d54c56caf527c039b9b3330018afb36/transformed/jetified-opencv-4.1.0-runtime.jar:org/opencv/android/BaseLoaderCallback$4.class
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2m 40s
859 actionable tasks: 859 executed
And also I could find this in the logs
> Task :app:processReleaseMainManifest
[:@react-native-async-storage] /Users/builder/clone/node_modules/@react-native-async-storage/async-storage/android/build/intermediates/library_manifest/release/AndroidManifest.xml Warning:
Package name 'com.reactnativecommunity.asyncstorage' used in: :@react-native-async-storage, :react-native-async-storage_async-storage.
[com.websitebeaver:opencv:4.1.0] /Users/builder/.gradle/caches/transforms-3/fcf304f50b7eebb3b0e77318cad199c2/transformed/jetified-opencv-4.1.0/AndroidManifest.xml Warning:
Package name 'org.opencv' used in: com.websitebeaver:opencv:4.1.0, :openCVLibrary310.
/Users/builder/clone/android/app/src/main/AndroidManifest.xml:12:9-20:20 Warning:
provider#com.reactnativecommunity.webview.RNCWebViewFileProvider@android:authorities was tagged at AndroidManifest.xml:12 to replace other declarations but no other declaration present
So what can I do to resolve this error?