2017-04-19 136 views
1

在iOS版的安裝說明,它說運行如何在使用Podfiles集成react-native時集成react-native-video?

react-native link

完成後我看到:

enter image description here

然而,立即編譯失敗,出現錯誤反應,和/ RCTViewManager.h不找到:

enter image description here

查看integration instructions on Facebook's website時,它使我們使用Podfile。當您使用Podfile,你的項目是這樣的:

enter image description here

這相較於反應天然樣品的項目,我可以看到,事實上,它不會出現使用Podfile集成在反應本土所有;而不是所有反應的組分包括爲庫:

enter image description here

因此,我懷疑的反應本地視頻的集成說明不與integration instructions found here兼容。

任何人都可以建議如何使用Podfiles集成react-native時如何集成react-native-video?

回答

1

您使用的是什麼版本的本機反應?這看起來像是因爲RN版本> 0.40的breaking change

此問題的簡短解決方法是,如果您在本機代碼中看到#import React/$(filename),請將其替換爲#import "$(filename)",但是如果您可以更新爲RN> 0.40,則更可取。

要獲得關於豆莢的問題,你應該能夠像pod 'react-native-video', :path => '../node_modules/react-native-video'講一下你的podfile和運行pod install(如果您Podfile到庫根的相對路徑不正確,用正確的一個替換)。縱觀github上頁react-native-video,它有一個podspec所以可能支持的CocoaPods安裝

+0

你的提示工作 - 我需要添加'莢「反應本地視頻」,:PATH =>「node_modules/react-native-video'',我能夠正確地整合這個項目。我運行原生0.43。謝謝! – esilver

相關問題