취업/ReactNative

[RN] TypeError: Cannot read property 'Constants' of null

카슈밀 2024. 2. 1. 12:01
반응형

React-native-video에서 발생한 에러인데, 해결방법이 레퍼런스를 봐도 모르겠더라...


현재 RN버전이 0.73인데 레퍼런스 내용대로 한다면
android에 따로 추가할 필요가 없다.

 

https://www.npmjs.com/package/react-native-video

 

react-native-video

A <Video /> element for react-native. Latest version: 5.2.1, last published: a year ago. Start using react-native-video in your project by running `npm i react-native-video`. There are 269 other projects in the npm registry using react-native-video.

www.npmjs.com

 

Android installation

Linking is not required in React Native 0.60 and above. If your project is using React Native < 0.60, run react-native link react-native-video to link the react-native-video library.

Or if you have trouble, make the following additions to the given files manually:

include ':react-native-video'
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer')

 

그런데, 이게 없어서 안되는 것이었다...

그럴거면 그냥 넣으라고 하던가 ㅇㅅㅇ

 

아무튼 코드는 문제가 없는데 뭐지해서 뻘짓하게 만들었다....

 

728x90