React Native Could not find method compile() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

 빌드 및 실행이 잘되던 리액트 네이티브 프로젝트가 SSD 고장으로 다시 윈도우 재 설치 후 개발 환경이 뭔가 바뀌었는지 아래와 같이 에러가 발생하네요.

* Where:
Build file 'D:\Study\rnstudy\node_modules\react-native-os\android\build.gradle' line: 43

* What went wrong:
A problem occurred evaluating project ':react-native-os'.
> Could not find method compile() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

해당 파일에 가서 아래와 같이 compile부분을 implementation으로 변경해줍니다.

dependencies {
compile 'com.facebook.react:react-native:+'
}

문제는 하나 고치고 빌드하면 아래와 같이 또 발생하네요. 나오는 것 모두 수정해줍니다.

* Where:
Build file 'D:\Study\rnstudy\node_modules\react-native-tcp\android\build.gradle' line: 43

* What went wrong:
A problem occurred evaluating project ':react-native-tcp'.
> Could not find method compile() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

댓글

이 블로그의 인기 게시물

'xxx.exe' 프로그램을 시작할 수 없습니다. 지정된 파일을 찾을 수 없습니다.

goorm IDE에서 node.js 프로젝트로 Hello World Simple Server 만들어 띄워보기

애드센스 수익을 웨스턴 유니온으로 수표대신 현금으로 지급 받아보자.