4
當我嘗試將Google VR SDK('GVRSDK')作爲Podfile依賴項添加時,我遇到了React Native的問題,並且它很容易複製。React Native與Google VR SDK不兼容
步驟:
- 創建一個新的空白陣營本地項目。使用
react-native run-ios
運行它以確保其正常工作。 cd ios
pod init
- 添加
pod 'GVRSDK'
到Podfile,執行pod update
cd ..
react-native run-ios
項目開車撞以下錯誤:
duplicate symbol __ZN3fLI9FLAGS_novE in:
/foo/ios/Pods/GVRSDK/Libraries/libGVRSDK.a(vlog_is_on.o)
/foo/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(vlog_is_on.o)
duplicate symbol __ZN3fLI7FLAGS_vE in:
/foo/ios/Pods/GVRSDK/Libraries/libGVRSDK.a(vlog_is_on.o)
/foo/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(vlog_is_on.o)
duplicate symbol __ZN6google13RemoveLogSinkEPNS_7LogSinkE in:
/foo/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(logging.o)
/foo/ios/Pods/GVRSDK/Libraries/libGVRSDK.a(logging.o)
duplicate symbol __ZN6google10AddLogSinkEPNS_7LogSinkE in:
/foo/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(logging.o)
/foo/ios/Pods/GVRSDK/Libraries/libGVRSDK.a(logging.o)
ld: 4 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld build/Build/Products/Debug-iphonesimulator/foo.app/foo normal x86_64
(1 failure)
降級到反應原生0.44.1(從0.45.1開始)似乎解決了這個問題。 –
同樣適用於我。降級(從0.45.1到0.44.3)將其固定。 – YossiF