inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

배달앱 클론코딩 [with React Native]

코드푸쉬 설정하기

build.gradle 에 react.gradle 없는 문제

1996

ymg886

작성한 질문수 1

0

안녕하세요~

최초 npx react-native init 프로젝트명 커맨드로 프로젝트를 만들면 build.gradle 파일에는 아래의 react.gradle 이 존재하지 않습니다.

apply from: "../../node_modules/react-native/react.gradle"

이부분은 향후에도 지원하지 않고 deprecated 된다고 하네요.

그래서 https://github.com/facebook/react-native/blob/main/template/android/app/build.gradle 여기 공식 github 에도 나와있지만 이제부턴 apply plugin: "com.facebook.react" 를 쓴다고 하고 프로젝트 init하면 default도 그렇게 되어 있습니다.

 

그런데 문제는!
이러한 build.gradle 환경에서 android 빌드해보면 아래와 같은 에러가 발생합니다.
bundleDebugJsAndAssets 를 :app 에서 찾을 수 없다고 나오는데 어떻게 해결하면 될까요?

 

info Starting JS server...

info Installing the app...

5 actionable tasks: 5 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:

Could not determine the dependencies of task ':app:generateBundledResourcesHashDebug'.

> Task with path 'bundleDebugJsAndAssets' not found in project ':app'.

* 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 4s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.

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

FAILURE: Build failed with an exception.

* What went wrong:

Could not determine the dependencies of task ':app:generateBundledResourcesHashDebug'.

> Task with path 'bundleDebugJsAndAssets' not found in project ':app'.

 

아래와 같은 이슈인거 같은데 known 이슈로 지금 디버깅 중인걸까요?

https://github.com/microsoft/react-native-code-push/issues/2418

 

 

react-native

답변 1

0

제로초(조현영)

코드푸쉬 설치 후에 발생하는 에러인가요? 그렇다면 맞는 것 같습니다. Rn 버전을 71버전으로 하신 경우에 발생하는 것 같습니다.

앱실행시 네이버맵 [401] 에러

0

1052

2

스타일링 라이브러리

0

160

2

expo, cli 선택 중에 고민이 있습니다.

0

177

2

JDK 버전이 달라도 괜찮나요?

0

239

2

dimenstion usewindowdeminstion

0

130

3

[맥 전용]환경 설정하기 1편 & [맥 전용]환경 설정하기 2편의 영상이 안나옵니다.

0

215

1

jdk11 버전과 gradle 버전의 호환성 관련 질문드립니다.

0

407

2

강의 외 질문입니다!

0

163

2

react native랑 맞는 ui 라이브러리 어떤게 좋을까요?

0

1540

2

react native와 spring boot 연결

0

364

1

java가 아닌 .kt에서 code push 에러가 발생합니다.

0

220

2

flipper 239 에러가 발생합니다.

0

170

2

package.json에 /lib/panino.js 문제입니다.

0

477

2

window - mac 협업 과정 질문합니다

0

221

1

ios 빌드 중 RCTBridgeDelegate.h import 오류

0

293

2

ios 앱 빌드 중 hermesEnabled 관련 오류발생

0

248

2

Socket 연결시 질문 드립니다.!

0

156

2

wifi 환경에서 axios 통신이 로컬서버에서 안됩니다.

0

430

2

iOS render error 질문드립니다.

0

417

2

iOS 가상머신 오류

0

171

2

npc react init 명령어 실행시 발생되는 오류

0

224

1

nom start 시 오류

0

120

1

NextJS 기반으로 만들어서 웹뷰 React Native로 배포 가능한가요?

0

1016

2

안드로이드 rn75 버전에 맞게 설정 중에 android13 다운로드에 대해서 막혔습니다!

0

187

2