[react-native]
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 app:installDebug -PreactNativeDevServerPort=8081
https://abodeofmystories.blogspot.com/2020/10/npx-react-native-run-android-failing-in.html
방법 1. npx @react-native-community/cli doctor에서 ANDROID_HOME 오류날경우
1) nano ~/.bash_profile
2)
export ANDROID_HOME=/Users/hyeminchoi/Library/Android/sdk
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/emulator
3) source ~/.bash_profile
방법 2. npx @react-native-community/cli doctor에서 Android sdk 오류날경우
gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
추가
... 방법 6까지
+ 설치
안된다.
----------------------- 내가 해결한 방법 -----------------------
-> adb devices
[디바이스명 device]
-> adb -s 디바이스명 reverse tcp:8081 tcp:8081
방법 1과 위의 명령어를 수행하면 돌아간다.