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
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:+'
}
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.
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.
댓글
댓글 쓰기