inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

react native 윈도우 실행 오류

1826

봉봉

작성한 질문수 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에 대한 이해도가 높은 전문가들이 도움을 줄 수 있을 거예요.

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

클로드코드 환경변수 설정

0

8

1

클로드코드 삭제 후 재설치

0

11

2

점점 매너리즘에 빠지게 됩니다..?

0

16

0

이해가 절반 정도 되는데요.

0

12

1

bash 명령어가 너무 많아요..

0

24

1

createPointTransactionOfLoading 에러

0

12

1

cursor화면이 좀 달라요 ㅜ

0

19

1

93~94강. 서브에이전트와 Shrimp Task Manager Plan과 차이

0

17

0

power shell에서는 claude가 정상 실행되는데, cursor terminal에서는 실행 에러 발생하네요.

0

17

1

live server, korean도 확장팩 검색이 되지 않습니다.

0

19

0

CLAUDE.local.md

0

19

1

55강 관련 질문(커밋이 완료되지 않을 때)

0

17

1

클로드 코드를 쓸때 Cursor IDE의 이점?

0

24

1

오류사항

0

34

3

md 파일을 위한 폴더 관리의 기준이 궁금합니다.

0

22

2

혹시 결제연동

0

26

1

claude code가 작업중일때 ctrl t 눌러서 진행상황 확인 불가

0

26

1

메타프롬프트 관련

0

27

2

side bar positon. 어떻게 해도 안돼요..;

0

22

1

모델 고정방법 문의

0

21

2

98강. 1인 사이드프로젝트 시 질문

0

36

2

state 객체로 묶기

0

22

1

강의화면과 Cursor프로그램 화면이 달라서요..

0

27

2

커서 설치했는데 이해 안되네요

0

35

2