티스토리 뷰

React Native 최초 설치후 yarn android 실행하였을 때 안드로이드 가상머신이 연결안될 때

 

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: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

* 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.org

BUILD FAILED in 512ms

    at makeError (/Users/yousungahn/project/studiomate/studiomate_user_beta/node_modules/execa/index.js:174:9)
    at /Users/yousungahn/project/studiomate/studiomate_user_beta/node_modules/execa/index.js:278:16
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async runOnAllDevices (/Users/userName/project/projectName/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:5)
    at async Command.handleAction (/Users/userName/project/projectName/node_modules/@react-native-community/cli/build/index.js:186:9)

 

여기서 중요한 에러 문구는 

Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

입니다.

 

gradle 이 설치 안되어서 생긴 문제.

 

해결 방법

$ brew install gradle 

으로 해결할수 있습니다.

'개발 > React-Native' 카테고리의 다른 글

React Native ISO 테스트 빌드하기  (0) 2020.06.09
댓글


최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday