React Native - Error: spawn ./gradlew EACCES

해피데빙·2022년 7월 24일
0

DND

목록 보기
26/33
post-custom-banner

Error: spawn ./gradlew EACCES

https://right-hot.tistory.com/entry/React-Native-Error-spawn-gradlew-EACCES

 error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
 Error: spawn ./gradlew EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)

접근 권한의 문제이며, 아래 명령어로 해결가능하다.

/root

 chmod 755 android/gradlew

Error: Command failed: ./gradlew app:installDebug

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 app:installDebug -PreactNativeDevServerPort=8081

If you encounter a ShellCommandUnresponsiveException exception such as:

Execution failed for task ':app:installDebug'.
com.android.builder.testing.api.DeviceException: com.android.ddmlib.ShellCommandUnresponsiveException

-> Try downgrading your Gradle version to 1.2.3 in android/build.gradle.

  • cd into /android and run ./gradlew assemble
  • upload* app-debug.apk from android/app/build/outputs/apk/ to phone and install it (you might need to enable unknown sources)
  • Run app, ignore the red screen, errors on the left and Unable to load JS bundle
    Shake device to inflate the dev menu:
    check (true) Auto reload on JS change
    open Debug server host for device and type your computer IP address
    return to your host computer and run on terminal react-native start
    restart the app/reload js on your phone and it's ready to go
profile
노션 : https://garrulous-gander-3f2.notion.site/c488d337791c4c4cb6d93cb9fcc26f17
post-custom-banner

0개의 댓글