react-native-video
react-native init Video
cd Video
cat package.json
{
"name": "Video",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.3",
"react-native": "0.57.8"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
npm install react-native-video --save
cat package.json
{
"name": "Video",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.3",
"react-native": "0.57.8",
"react-native-video": "^4.2.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}
react-native link
rnpm-install info Linking react-native-video ios dependency
rnpm-install info Platform 'ios' module react-native-video has been successfully linked
rnpm-install info Linking react-native-video android dependency
rnpm-install info Platform 'android' module react-native-video has been successfully linked
react-native run-ios
app.js 내용
해당 xcode => Build Phases => Link Binary With Libraries
libRCTVideo.a 삭제 후 video 추가 해서 해결
ㄷㅏ시 테스트 하려니 잘 수행되네..
아래는 내가 에러 내용 찾을 때 검색했던 사이트와 해결내용
https://github.com/react-native-community/react-native-video/issues/438
I found the solution that fixed me the problem.
Go to.. xCode -> Build Phases -> Link Binary With Libraries.
In the list find the file "libRCTVideo.a", if you will see it like icon of clean white paper than just delete it from the list and add it again by click on the plus (+) icon and just type "video" and add it.
Now in the commnd line run the commnad: "react-native run-ios", and "WALLA" no error.
'ReactNative' 카테고리의 다른 글
react native web view debugging 리액트 네이티브 웹뷰 디버깅 (0) | 2019.02.25 |
---|---|
fbsdksharekit/fbsdksharekit.h' file not found fbsdkcorekit/fbsdkcorekit.h' file not found (0) | 2019.02.15 |