inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

react native 윈도우 실행 오류

1842

봉봉

작성한 질문수 4

0

이번에 처음으로 앱 개발 공부를 해보려고 react native를 열심히 실행해 봤습니다.

중간에 계속 에러가 나고 막히는 부분이 있었지만 겨우 마지막에 npm run android부분까지 왔습니다. 그런데 실행을 할려고 하면 계속

C:\Users\aladi\MyApp\NewApp>npx react-native run-android
info Starting JS server...

info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor


FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file 'C:\Users\aladi\MyApp\NewApp\android\app\build.gradle' line: 2

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not find implementation class 'com.facebook.react.ReactPlugin' for plugin 'com.facebook.react' specified in jar:file:/C:/Users/aladi/.gradle/caches/jars-9/e787d8a8f912d81d210d8e27e6fa5ed3/react-native-gradle-plugin.jar!/META-INF/gradle-plugins/com.facebook.react.properties.

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

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':app'.
> compileSdkVersion is not specified. Please add it to build.gradle

* 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 12s
error Failed to install the app. Command failed with exit code 1: gradlew.bat tasks FAILURE: Build completed with 2 failures. 1: Task failed with an exception. ----------- * Where: Build file 'C:\Users\aladi\MyApp\NewApp\android\app\build.gradle' line: 2 * What went wrong: A problem occurred evaluating project ':app'. > Could not find implementation class 'com.facebook.react.ReactPlugin' for plugin 'com.facebook.react' specified in jar:file:/C:/Users/aladi/.gradle/caches/jars-9/e787d8a8f912d81d210d8e27e6fa5ed3/react-native-gradle-plugin.jar!/META-INF/gradle-plugins/com.facebook.react.properties. * 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. ============================================================================== 2: Task failed with an exception. ----------- * What went wrong: A problem occurred configuring project ':app'. > compileSdkVersion is not specified. Please add it to build.gradle * 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 12s
> Task :gradle-plugin:compileKotlin UP-TO-DATE > Task :gradle-plugin:compileJava NO-SOURCE > Task :gradle-plugin:pluginDescriptors UP-TO-DATE > Task :gradle-plugin:processResources UP-TO-DATE > Task :gradle-plugin:classes UP-TO-DATE > Task :gradle-plugin:jar UP-TO-DATE > Task :gradle-plugin:inspectClassesForKotlinIC UP-TO-DATE 5 actionable tasks: 5 up-to-date.

이런 에러가 뜨더라구요

정말 이쪽부분은 하나도 모르는 코린이라 아무리 구글링해보고 혼자 머리 굴려봐도

해결이 되지 않습니다.. 에뮬레이터까지는 뜨는데 react native화면은 뜨지 않고 저렇게 에러 메세지만 나옵니다. 어떻게 해야될까요.. 제발 도와주세요ㅜ

react-native react app android windows node

답변 1

0

인프런 AI 인턴

안녕하세요, 인프런 AI 인턴이에요.

React Native 앱 개발 공부를 진행하다가 윈도우 실행 오류가 발생하셨군요. 오류 메시지에는 여러 가지 내용이 포함되어 있는데, 일단 가장 중요한 부분을 확인해보겠습니다.

에러 메시지에 따르면 ‘C:\Users\aladi\MyApp\NewApp\android\app\build.gradle’에서 문제가 발생한 것으로 나와 있습니다. 또한 ‘com.facebook.react.ReactPlugin’과 관련된 클래스를 찾을 수 없다는 내용이 있습니다.

오류 해결을 위해 몇 가지 확인해볼 사항이 있습니다.
1. React Native 환경 설정을 제대로 마쳤는지 확인해주세요. 다음 명령어를 실행하여 React Native 환경을 확인할 수 있습니다.

npx react-native doctor

확인 결과에 빨간색으로 표시된 문제들이 있다면 해당 문제들을 해결하셔야 합니다.

  1. React Native 프로젝트의 종속성을 최신 버전으로 업데이트할 필요가 있는지 확인해주세요. 다음 명령어를 실행하여 종속성을 업데이트할 수 있습니다.
npm install
  1. React Native 프로젝트의 Gradle 파일을 확인해보세요. ‘C:\Users\aladi\MyApp\NewApp\android\app\build.gradle’ 파일이 존재하는지, 그리고 내용이 올바른지 확인해보세요. 필요한 설정이 있는지 잘 확인하셔야 합니다.

위의 사항들을 차례대로 확인하고 문제가 해결되지 않는다면, 구체적인 스택 트레이스 정보나 로그를 더 살펴보실 필요가 있을 수 있습니다. 해당 명령을 실행할 때 ‘Run with –stacktrace’나 ‘–info’, ‘–debug’ 등과 같이 추가 옵션을 사용하여 더 자세한 로그 출력을 확인해보세요.

더 자세한 내용이 필요하다면 React Native 커뮤니티나 관련 포럼 등에서 질문해보시는 것도 좋은 방법일 수 있습니다. React Native에 대한 이해도가 높은 전문가들이 도움을 줄 수 있을 거예요.

문제 해결에 도움이 되었길 바라며, 성공적인 앱 개발 공부를 진행하시길 바랍니다. 추가로 궁금한 사항이 있으면 언제든지 물어보세요. 좋은 결과 있기를 기대할게요.

Git, Github 기초부터 실전까지 중 질문드립니다.

0

8

2

재생이 안됩니다.

0

15

0

클로드 설치 및 강의 미션 관련

0

19

0

/config Thinking mode 설정

0

20

1

안녕하세요, 강의 수강 중인 학생입니다.

0

19

2

rules 폴더나 CLAUDE.md 파일 관리 관련 질문

0

20

2

다작 시 firebase 설정

0

22

2

cursor 안에서 다운로드 안되는 게 많은데 대체가 필요할까요

0

40

2

업데이트로 인한 에이전트 생성 변경

0

43

2

starter kit 프로젝트에 prd 문서 만들기

0

51

2

명령어 여러줄 입력방법?

0

49

2

ctrl + 't' 단축어가 안먹어요

0

40

1

클로드코드 계획 보고 방법 알고싶어요.

0

54

2

실무 버전 출시는 언제?

0

50

1

예시 1, 2, 3에서 질문있습니다.

0

46

2

Cursor 프로젝트 목록 및 작업 환경 동기화 문의

0

36

1

파워쉘, 터미널

0

48

2

스킬과 서브에이전트 병행 사용 질문

0

57

2

강의 잘 들었습니다.

0

36

1

터미널에서 커서 AI 직접 실행

0

42

2

해결했습니다

0

39

1

이런 경우는 어떤 조치를 취해야할까요?

0

49

2

hooks 설정이 안되요

0

52

2

영상 최신으로 엡데이트 요청

0

73

2