I am facing this issue everytime I am running npx react-native run-android.
Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-gesture-handler:generateDebugRFile'.
Could not resolve all files for configuration ':react-native-gesture-handler:debugCompileClasspath'.
Failed to transform react-native-0.71.0-rc.0-debug.aar (com.facebook.react:react-native:0.71.0-rc.0) to match attributes {artifactType=android-symbol-with-package-name, com.android.build.api.attributes.BuildTypeAttr=debug, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-api}.
> Could not find react-native-0.71.0-rc.0-debug.aar (com.facebook.react:react-native:0.71.0-rc.0).
Searched in the following locations:
https://repo.maven.apache.org/maven2/com/facebook/react/react-native/0.71.0-rc.0/react-native-0.71.0-rc.0-debug.aar
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 42s
at makeError (C:\Users\neera\Documents\Roohi\WhiteHat\SkyDine_New\node_modules\execa\index.js:174:9)
at C:\Users\neera\Documents\Roohi\WhiteHat\SkyDine_New\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\Users\neera\Documents\Roohi\WhiteHat\SkyDine_New\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\neera\Documents\Roohi\WhiteHat\SkyDine_New\node_modules\#react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
Please help me this.
Thanks
Related
1 actionable task: 1 executed
e: D:\IMG\React-Native\ReactNativeProject\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\tasks\BundleHermesCTask.kt: (137, 11): This declaration is experimental and its usage must be marked with '#kotlin.ExperimentalStdlibApi' or '#OptIn(kotlin.ExperimentalStdlibApi::class)'
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-gradle-plugin:compileKotlin'.
Compilation error. See log for more details
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 2m 40s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
e: D:\IMG\React-Native\ReactNativeProject\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\tasks\BundleHermesCTask.kt: (137, 11): This declaration is experimental and its usage must be marked with '#kotlin.ExperimentalStdlibApi' or '#OptIn(kotlin.ExperimentalStdlibApi::class)'
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-gradle-plugin:compileKotlin'.
Compilation error. See log for more details
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 2m 40s
at makeError (D:\IMG\React-Native\ReactNativeProject\node_modules\execa\index.js:174:9)
at D:\IMG\React-Native\ReactNativeProject\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (D:\IMG\React-Native\ReactNativeProject\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:82:7)
at async Command.handleAction (D:\IMG\React-Native\ReactNativeProject\node_modules\#react-native-community\cli\build\index.js:108:9)
info Run CLI with --verbose flag for more details.
BUILD FAILED in 7s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':react-native-image-crop-picker'.
Could not open proj generic class cache for build file 'D:\OCR\node_modules\react-native-image-crop-picker\android\build.gradle' (C:\Users\nandl.gradle\caches\7.5.1\scripts\bur88vdw3wcsl4j1x88z00g9i).
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 63
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 7s
at makeError (D:\OCR\node_modules\execa\index.js:174:9)
at D:\OCR\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (D:\OCR\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\OCR\node_modules\#react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.
PS D:\OCR>
I npm install react-native-video-player after then, When I restarted the application, I encountered this error
BU�LD FAILED in 23s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8082
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\zekican.aydin\test\psikoyorum-mobile\node_modules\react-native-video\android\build.gradle' line: 20
What went wrong:
A problem occurred evaluating project ':react-native-video'.
Could not find method provided() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
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
BU�LD FAILED in 23s
at makeError (C:\Users\zekican.aydin\test\psikoyorum-mobile\node_modules\#react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at C:\Users\zekican.aydin\test\psikoyorum-mobile\node_modules\#react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\Users\zekican.aydin\test\psikoyorum-mobile\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\zekican.aydin\test\psikoyorum-mobile\node_modules\#react-native-community\cli\build\index.js:192:9)
Task :app:checkDebugAarMetadata FAILED
10 actionable tasks: 2 executed, 8 up-to-date
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Failed to transform react-native-reanimated-67.aar (project :react-native-reanimated) to match attributes {artifactType=android-aar-metadata}.
> Execution failed for JetifyTransform: C:\Users\ASUS\FinalProject\node_modules\react-native-reanimated\android\react-native-reanimated-67.aar.
> Transform's input file does not exist: C:\Users\ASUS\FinalProject\node_modules\react-native-reanimated\android\react-native-reanimated-67.aar. (See https://issuetracker.google.com/issues/158753935)
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 3m 2s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Failed to transform react-native-reanimated-67.aar (project :react-native-reanimated) to match attributes {artifactType=android-aar-metadata}.
> Execution failed for JetifyTransform: C:\Users\ASUS\FinalProject\node_modules\react-native-reanimated\android\react-native-reanimated-67.aar.
> Transform's input file does not exist: C:\Users\ASUS\FinalProject\node_modules\react-native-reanimated\android\react-native-reanimated-67.aar. (See https://issuetracker.google.com/issues/158753935)
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 3m 2s
at makeError (C:\Users\ASUS\FinalProject\node_modules\execa\index.js:174:9)
at C:\Users\ASUS\FinalProject\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async runOnAllDevices (C:\Users\ASUS\FinalProject\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\ASUS\FinalProject\node_modules\react-native\node_modules\#react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
I have all the environment variables configured correctly, and I have this error
Task :app:processDebugResources FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
82 actionable tasks: 3 executed, 79 up-to-date
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
Could not read path 'C:\Users\Antonio\Desktop\Proyectos\Personales\meissaa-app-mad\android\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\appcompat'.
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 58s
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. Run CLI with --verbose flag for more details.Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
Could not read path 'C:\Users\Antonio\Desktop\Proyectos\Personales\meissaa-app-mad\android\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\appcompat'.
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 58s
at checkExecSyncError (child_process.js:629:11)
at execFileSync (child_process.js:647:13)
at runOnAllDevices (C:\Users\Antonio\Desktop\Proyectos\Personales\meissaa-app-mad\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
at buildAndRun (C:\Users\Antonio\Desktop\Proyectos\Personales\meissaa-app-mad\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at then.result (C:\Users\Antonio\Desktop\Proyectos\Personales\meissaa-app-mad\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12)
at process._tickCallback (internal/process/next_tick.js:68:7)