javascript - react-native-video: Cannot read property 'Constants' of null - Stack Overflow

I am trying to include a YouTube video in my react native project. Since I already tried react-native-y

I am trying to include a YouTube video in my react native project. Since I already tried react-native-youtube and did not work at all I tried installing react-native-video.

However, I am getting the following error:

I tried: deleting my node_modules and npm i again followed by react-native link and react-native link react-native-video. Several times.

My package.json:

I am trying to include a YouTube video in my react native project. Since I already tried react-native-youtube and did not work at all I tried installing react-native-video.

However, I am getting the following error:

I tried: deleting my node_modules and npm i again followed by react-native link and react-native link react-native-video. Several times.

My package.json:

Share Improve this question asked Feb 1, 2020 at 15:17 HristoTotovHristoTotov 1532 gold badges2 silver badges5 bronze badges 2
  • your source? <Video /> ponent parameters? .... from source ` const RCTVideoInstance = this.getViewManagerConfig('RCTVideo');` fails – xadm Commented Feb 1, 2020 at 15:56
  • This is happening to me on android too, any help? – J-- Commented Jan 2, 2022 at 11:07
Add a ment  | 

6 Answers 6

Reset to default 2

For Android using Expo and EAS Build I just ran

eas build --profile development --platform android

This fixed my issue

I assume with pure React Native too you just need to rebuild the App.

react-native: 0.63.4: the problem is with linking, the issue got fixed by following these steps:

  • -removing the Pods folder from the ios folder:
  • -removing the node modules
  • -removing the build using this mand: rm -rf ios/build
  • -running Yarn to reinstall the packages
  • -installing Pods using this mand: cd ios && pod install --repo-update && cd ..
  • -running the ios build
  • -starting react native and removing the cache with this mand: yarn start --reset-cache

This worked for me

  • react-native link
  • cd ios && pod install
  • check in podfile that react-native-video is added or not.
  • If not add it manually and run pod install.
  • then in xcode build Phases check search video , if you found video package already added then run app and check.
  • otherwise add it manually in Link Binary with Libraries.
  • and run app.

for me it was closing the metro window (I switched from project with react-native-video to a project with expo-av)

For me, it was downloading packages with npm. I had installed expo-CLI and was downloading packages for react-native CLI. There's some cross package error i guess however if you're using expoCLI and missed this by mistake you can clean node_modules remove package-lock.json and use expo-video. https://docs.expo.dev/versions/latest/sdk/video/ or https://www.npmjs./package/expo-video-player

npm i expo-video-player

An old build was the root of my problem. Had to delete the app and reinstall with xcode. Classic rinse and repeat.

"react-native": "0.74.3", "react-native-video": "^5.2.1",

For reference: https://github./TheWidlarzGroup/react-native-video/issues/1738#issuement-533917249

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743758747a4502232.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信