초기세팅 에러_React Native

miin·2021년 11월 23일
0

TIL

목록 보기
23/24
post-thumbnail

$ react-native run-android 실행

에러발생

error Failed to install the app. 
Make sure you have an Android emulator running
또는
Failed to launch emulator.
$ npx @react-native-community/cli doctor -> 

Common
 ✓ Node.js
 ✓ yarn
 ✖ Watchman - Used for watching changes in the filesystem when in development mode
   - Version found: 2021.11.15.00
   - Version supported: 4.x

Android
 ✓ JDK
 ✓ Android Studio - Required for building and installing your app on Android
 ✓ Android SDK - not Found

iOS
 ✓ Xcode - Required for building and installing your app on iOS
 ✓ CocoaPods - Required for installing iOS dependencies
 ● ios-deploy - Required for installing your app on a physical device with the CLI

해본 것

1. sudo chmod 755 android/gradlew
2. vi ~/.zshrc 에서 path 추가하기

해결코드

  • android-sdk가 없어서 계속 에러가 났음
1. brew install cask
2. brew cask install android-sdk

해결후

 ✘ sumin@gimsumin-ui-MacBookPro  ~/Desktop/bbatalk-rn   side ±  npx @react-native-community/cli doctor
Common
 ✓ Node.js
 ✓ yarn
 ✖ Watchman - Used for watching changes in the filesystem when in development mode
   - Version found: 2021.11.15.00
   - Version supported: 4.x

Android
 ✓ JDK
 ✓ Android Studio - Required for building and installing your app on Android
 ✓ Android SDK - Required for building and installing your app on Android
 ✓ ANDROID_HOME

iOS
 ✓ Xcode - Required for building and installing your app on iOS
 ✓ CocoaPods - Required for installing iOS dependencies
 ● ios-deploy - Required for installing your app on a physical device with the CLI

Errors:   1
Warnings: 1

Attempting to fix 1 issue...

Common
 ✔ Watchman

error:

Failed to install the app. Make sure you have the Android development environment set up
-> sudo chmod 755 android/gradlew

오류나는것 골라주는 실행문

npx @react-native-community/cli doctor

에뮬레이터 에러

adb reverse tcp:8081 tcp:8081

참고
https://dlevelb.tistory.com/1142

0개의 댓글