1

I am getting this error while running "npm run android". Please help me to solve this.


> Task :app:processDebugResources FAILED

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.3/userguide/command_line_interface.html#sec:command_line_warnings
420 actionable tasks: 4 executed, 416 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
  <ROOT_FOLDER>\android\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:24: AAPT: error: unexpected element <queries> found in <manifest>.



* 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

BUILD FAILED in 1m 1s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
  <ROOT_FOLDER>\android\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:24: AAPT: error: unexpected element <queries> found in <manifest>.



* 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

BUILD FAILED in 1m 1s

I have followed some methods below to solve it but not working: Method 1: cd android ./gradlew clean npm run android

Method 2: npx react-native link npm run android

Method 3: cd android ./gradle.bat clean npm run android

I have also removed node_modules and installed it again but didn't work.

I am expecting to build successfully and run the app on the physical device.

  • 1
    Didn't work for the above problem. But, it works for the error I was facing in the morning. Actually, the thing is that till November 5 my app was working properly. This morning, I was building this app to work on a physical device, so I was facing a problem that is solved with the solution you mentioned. Thank you so much @Thanhal, you saved my night. The above error came after upgrading the dependency "react-native-community/toolbar-android@0.1.0-rc.2" to "^0.2.1" and also changing "minSdk=19" to "minSdk=21". – abhishek_maran Nov 08 '22 at 15:16

0 Answers0