본문 바로가기

Error

Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081(Mac React-native Error)

반응형

Mac에서 npx  react-native run-android를 실행하면 나오는 오류였다.

 

이 에러도 되게 많이 나왔다.

 

해결 방법은 되게 간단했다.

먼저, 터미널에 adb devices를 입력하여 android device가 연결 돼있는지 확인해봐라.

안돼있으면 환경변수가 제대로 설정돼있는지 확인해보아라.

(나는 왜인지 모르겠는데 자꾸 환경변수 설정이 풀렸다. )

!.zshrc설정 했음 ㅠㅠ 이유아시는 고수분 알려주세여 ㅠㅠ

 

환경변수설정을 하고나서 adb devices를 입력하면 amulator 종류가 나올것이다.

 

그 다음으로

터미널에서 해당 프로젝트 디렉토리로 이동해서 

1.  gradlew clean

2.  npx react-native run-android

를 입력하면된다.

 

 

 

참고 문서 : github.com/facebook/react-native/issues/22466

 

Stuck on app:installDebug when running react-native run-android · Issue #22466 · facebook/react-native

Review the documentation: https://facebook.github.io/react-native Search for existing issues: https://github.com/facebook/react-native/issues Use the latest React Native release: https://github.com...

github.com

 

 

오늘도 열코!!

반응형