inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

react native 윈도우 실행 오류

1830

봉봉

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

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

<div id="banner">배너 이미지</div> 관련 질문

0

7

1

fatal: repository 'https://github.com/gymcoding/my-marketplace.git/' not found

0

15

2

live server, korean 을 검색해도 아무것도 나오지 않음

0

15

1

커서질문

0

20

1

강의자료

0

18

1

SUPABASE에서 AOI 선택여부

0

16

2

클로드 코드 터미널 사용시 git, git 허브 활용 법

0

22

1

mcp.json파일 생성 X

0

19

2

강의 내용이 정신이없네요 ;;

0

43

2

제 컴퓨터에서는 Claude's plan이 아래와 같이 나오는데 괜찮은 건가요?

0

27

2

강의에서 사용하는 prompt

0

22

2

window 11 환경 + git bash 터미널 statusline 반영이 안됩니다 ㅠ

0

28

2

강사님 질문있습니다.

0

20

1

프로젝트를 커밋할때 알려주세요

0

25

1

작업결과물이 수업내용의 화면이 좀 다르네요

0

36

2

강의 도중 에러가 발생합니다.

0

34

2

사진과 같이 영상에 한글이 실시간으로 영어로 번역되어 보입니다

0

35

2

커밋버튼 비활성화

0

32

2

Cursor 질문

0

24

2

웹사이트 구축 질문

0

37

1

플러그인, git repo 설치 및 삭제

0

31

1

162 자료

0

22

2

supabase mcp로 테이블 생성 보여주실떄

0

30

2

settings.local.json

0

35

2