admin管理员组文章数量:1334342
I'm setting React Native up for an android project.
i had installed all dependencies and checked by npx react-native doctor
and this is the doctor's result:
Common
✓ Node.js - Required to execute JavaScript code
✓ npm - Required to install NPM dependencies
✓ Metro - Required for bundling the JavaScript code
Android
✓ Adb - Required to verify if the android device is attached correctly
✓ JDK - Required to compile Java code
✓ Android Studio - Required for building and installing your app on Android
✓ ANDROID_HOME - Environment variable that points to your Android SDK installation
✓ Gradlew - Build tool required for Android builds
✓ Android SDK - Required for building and installing your app on Android
Errors: 0
Warnings: 0
now in terminal I use npx react-native run-android
command to run my sample project but i get this error:
BUILD FAILED in 23s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * Where: Settings file 'D:\Projects\AwesomeProject\android\settings.gradle' line: 2 * What went wrong: Error resolving plugin [id: 'com.facebook.react.settings'] > java.io.UncheckedIOException: Could not move temporary workspace (D:\Projects\AwesomeProject\android\.gradle\8.10.2\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10-dd285373-4e2a-49c9-8a20-5145657540c5) to immutable location (D:\Projects\AwesomeProject\android\.gradle\8.10.2\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10) * 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 . BUILD FAILED in 23s.
I saw in a youtube video that I should open the project in android studio once then this error would be solved but again I'm getting same error there:
I had tried to delete caches folder in .gradle directory also changed gradle folders access to full.
please anyone help me and community to solve this problem, I would buy him a coffee.
I'm setting React Native up for an android project.
i had installed all dependencies and checked by npx react-native doctor
and this is the doctor's result:
Common
✓ Node.js - Required to execute JavaScript code
✓ npm - Required to install NPM dependencies
✓ Metro - Required for bundling the JavaScript code
Android
✓ Adb - Required to verify if the android device is attached correctly
✓ JDK - Required to compile Java code
✓ Android Studio - Required for building and installing your app on Android
✓ ANDROID_HOME - Environment variable that points to your Android SDK installation
✓ Gradlew - Build tool required for Android builds
✓ Android SDK - Required for building and installing your app on Android
Errors: 0
Warnings: 0
now in terminal I use npx react-native run-android
command to run my sample project but i get this error:
BUILD FAILED in 23s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * Where: Settings file 'D:\Projects\AwesomeProject\android\settings.gradle' line: 2 * What went wrong: Error resolving plugin [id: 'com.facebook.react.settings'] > java.io.UncheckedIOException: Could not move temporary workspace (D:\Projects\AwesomeProject\android\.gradle\8.10.2\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10-dd285373-4e2a-49c9-8a20-5145657540c5) to immutable location (D:\Projects\AwesomeProject\android\.gradle\8.10.2\dependencies-accessors\569c8b261a8a714d7731d5f568e0e5c05babae10) * 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.. BUILD FAILED in 23s.
I saw in a youtube video that I should open the project in android studio once then this error would be solved but again I'm getting same error there:
I had tried to delete caches folder in .gradle directory also changed gradle folders access to full.
please anyone help me and community to solve this problem, I would buy him a coffee.
Share Improve this question edited Nov 20, 2024 at 9:46 Mehdi asked Nov 20, 2024 at 9:36 MehdiMehdi 831 silver badge10 bronze badges1 Answer
Reset to default 0Solved after 12 days conflict to setup react native and no answer in community.
run these steps:
- run
npx react-native doctor
- be sure you pass all doctor items
- open terminal and go to you project directory
cd android
- run
rd /s /q .gradle
- run
npx react-native run-android
本文标签: react nativeHow to solve UncheckedIOException Error on ReactNative SetupStack Overflow
版权声明:本文标题:react native - How to solve UncheckedIOException Error on ReactNative Setup? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742368471a2461759.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论