Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] undefined is not an object (evaluating NativeModuels.UIManager.RCTVideo.Constants') #237

Closed
lsps9150414 opened this issue Jun 3, 2016 · 31 comments
Labels
stale Closed due to inactivity or lack or resources

Comments

@lsps9150414
Copy link

lsps9150414 commented Jun 3, 2016

Getting this error when I navigate to a scene containing the Video component under ios.
However, this only happens when I started the simulator with react-native run-ios. If I run with Xcode, everything works fine.

react native version: react-native@0.25.1

2016-06-03 1 51 49

@lsps9150414 lsps9150414 changed the title undefined is not an object (evaluating NativeModuels.UIManager.RCTVideo.Constants') [iOS] undefined is not an object (evaluating NativeModuels.UIManager.RCTVideo.Constants') Jun 3, 2016
@brettpappas
Copy link

I'm having the same problem.

@zaynyatyi
Copy link

I have same too

@zaynyatyi
Copy link

happens to me only when content is bundled

@ghost
Copy link

ghost commented Jun 12, 2016

Same error but building from Xcode doesn't help.

@nikhildaga
Copy link

Facing the same problem on android

@nikhildaga
Copy link

nikhildaga commented Jul 3, 2016

Has anyone been able to solve this?

@StellwagJo
Copy link

StellwagJo commented Jul 7, 2016

Same issue here on Android
Using react-native 0.23.1

@alessandro-bottamedi
Copy link

alessandro-bottamedi commented Jul 7, 2016

Same issue react-native 0.29 on iOs

EDIT:
resolved re-launching "rnpm link react-native-video" command...

@arilitan
Copy link

arilitan commented Jul 21, 2016

im getting this same error on Android, anyone have any luck?

re-launching "rnpm link react-native-video" didnt help

@keung725
Copy link

same issue

@vgurbuxani
Copy link

thanks everyone, this command worked: resolved re-launching "rnpm link react-native-video" command.. i was having the same issue. you just saved me another few hours of banging my head against the wall

@kevin-xiong
Copy link

kevin-xiong commented Aug 23, 2016

You can do it yourself
1.in the project navigator, right click Libraries, add RCTVideo.xcodeproj to your project
2.select your project,select Build Phases -> Link Binary With Libraries,add libRCTVideo.a
3. re-launching "react-native run-ios"

@nikhildaga
Copy link

This issue has not been resolved. Why is it closed?

@mattapperson
Copy link
Contributor

@nikhildaga sorry, others had commented that running 'rnpm link react-native-video' fixed the issue (or otherwise linking manually. Have you done this and are still having issues?

@StellwagJo
Copy link

StellwagJo commented Aug 31, 2016

Still having this issue. Also rnpm or manually linking didn't work for me.
React-Native: 0.29.2
Android: 6.0.2
@mattapperson can you please re-open this issue. thx

@mattapperson mattapperson reopened this Aug 31, 2016
@mattapperson
Copy link
Contributor

Please try deleting the node_modules directory, 'npm cache clear' and 'npm install'. Once that is done run 'rnpm link react-native-video'

@StellwagJo
Copy link

Hi @mattapperson,
could fix this issue by going into the /android folder and use

gradlew.bat clean

Keep in mind to not run the packager and delete the old imports of the Video Component at the MainActivity.java if you are using >= 0.29 RN

@RafalWilinski
Copy link

RafalWilinski commented Sep 3, 2016

I'm also facing this issue. Removed node_modules, cleaned cache, ran rnpm link react-native-video, checked that libRCTVideo.a is linked in build phase and still nothing. I've also ran cd ios && xcodebuild clean, didn't help.

react-native-cli: 1.0.0
react-native: 0.32.0
node: 6.0.0
npm: 3.8.6

Update:
I had to run project from Xcode and enable developer mode...

@lxfriday
Copy link

lxfriday commented Nov 7, 2016

rnpm link react-native-video will help

@lxfriday
Copy link

lxfriday commented Nov 7, 2016

and then rebuild from xcode

@bharatraichur
Copy link

I am currently facing this issue on Android, its working fine on iOS. I am new to React, any info would be helpful

@zb1006801184
Copy link

select your project,select Build Phases -> Link Binary With Libraries,add libRCTVideo.a

@arhmnsh
Copy link

arhmnsh commented Jan 14, 2017

For Android, this should work: #184 (comment)

For iOS, close the packager, and then rerun the Xcode project.

@zhangzeyan
Copy link

I'm also facing this issue and has not been resolved. Has anyone been able to solve this?

@liangzhm
Copy link

I am also facing this problem,and it still has not been resolved,has anybody can help me solve this issue?

@developer239
Copy link

  • rm rf node_modules
  • yarn cache clean
  • yarn install
  • react-native link react-native-video (already linked)
  • yarn start
  • react-native run-android

I get following screen:
sdafsdafsadf

Thank you for your help.

@yangmingtao
Copy link

at first i failed but at last i success android我认为ios比android好集成这个

@custam
Copy link

custam commented Jan 1, 2018

I solved it by installing react-native-video with pods :

  1. install pods
  2. add this to your podfile is ios folder of your project :
    pod 'react-native-video', path: '../node_modules/react-native-video'
  3. launch pod install
  4. maybe delete the "-obj" in the "target support files" of file "pods". You can find it by opening your xcworkspace file in xcode.
  5. rerun your project

@RohitRox
Copy link

RohitRox commented Sep 5, 2018

Removing derived data and restarting simulator fixed this issue for me (ios).

@fabianunger
Copy link

fabianunger commented Nov 7, 2018

For me the following worked for me:

  • yarn add react-native-video - OR - npm install --save react-native-video
  • then link manually: Open Project in XCode -> right click Libraries -> Add Files to 'ProjectName' -> find RCTVideo.xcodeproj in node_modules
  • include both libRCTVideo.a in the Build Phases of the Project (you can get there under the Targets)
    (libRCTVideo.a : one is within RCTVideo.xcodeproj,the other in RCTVideo.xcodeproj > Products)
  • DO NOT include pod 'react-native-video', :path => '../node_modules/react-native-video/react-native-video.podspec' in the pod file.

@haoshuanqin
Copy link

You can do it yourself
1.in the project navigator, right click Libraries, add RCTVideo.xcodeproj to your project
2.select your project,select Build Phases -> Link Binary With Libraries,add libRCTVideo.a
3. re-launching "react-native run-ios"

You can do it yourself
1.in the project navigator, right click Libraries, add RCTVideo.xcodeproj to your project
2.select your project,select Build Phases -> Link Binary With Libraries,add libRCTVideo.a
3. re-launching "react-native run-ios"

successfully solve.

@hueniverse hueniverse added the stale Closed due to inactivity or lack or resources label Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Closed due to inactivity or lack or resources
Projects
None yet
Development

No branches or pull requests