Open XinQiXiao opened 5 years ago
请问怎么用pod导入,我在ios目录下添加podfile文件,内容如下 `pod 'React', :path => '../node_modules/react-native', :subspecs => [ 'Core', 'CxxBridge', 'DevSupport', 'RCTText', 'RCTNetwork', 'RCTWebSocket', 'RCTAnimation' ] pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga' pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'react-native-baidu-map', :podspec => '../node_modules/react-native-baidu-map/ios/react-native-baidu-map.podspec'`
### 运行pod install 报如下错误
!] The dependency
React/Core (from ../node_modules/react-native
)is not used in any concrete target. The dependency
React/CxxBridge (from ../node_modules/react-native
)is not used in any concrete target. The dependency
React/DevSupport (from ../node_modules/react-native
)is not used in any concrete target. The dependency
React/RCTText (from ../node_modules/react-native
)is not used in any concrete target. The dependency
React/RCTNetwork (from ../node_modules/react-native
)is not used in any concrete target. The dependency
React/RCTWebSocket (from ../node_modules/react-native
)is not used in any concrete target. The dependency
React/RCTAnimation (from ../node_modules/react-native
)is not used in any concrete target. The dependency
yoga (from ../node_modules/react-native/ReactCommon/yoga
)is not used in any concrete target. The dependency
DoubleConversion (from ../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec
)is not used in any concrete target. The dependency
glog (from ../node_modules/react-native/third-party-podspecs/glog.podspec
)is not used in any concrete target. The dependency
Folly (from ../node_modules/react-native/third-party-podspecs/Folly.podspec
)is not used in any concrete target. The dependency
react-native-baidu-map (from ../node_modules/react-native-baidu-map/ios/react-native-baidu-map.podspec
)is not used in any concrete target.
缺乏工程 target,需要在 pod * 前加 target "工程名字" do
我的 podfile 文件内容如下(作为参考)
platform :ios, '9.0'
target '(工程名)' do pod 'React', :path => '../node_modules/react-native', :subspecs => [ 'Core', 'CxxBridge', 'DevSupport', 'RCTText', 'RCTNetwork', 'RCTWebSocket', 'RCTAnimation' ] pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga' pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'react-native-baidu-map', :podspec => '../node_modules/react-native-baidu-map/ios/react-native-baidu-map.podspec'
pod 'react-native-webview', :path => '../node_modules/react-native-webview'
end
你好,我导入的是android,link的,但是报Invariant Violation: Invariant Violation: requireNativeComponent: "BaiduMapView" was not found in the UIManager. 请问您是怎么解决的呢?
这个我还没遇到过。我这边执行react native link 就成功了。
这个我还没遇到过。我这边执行反应原生链接就成功了。
请问你用的RN是哪个版本?react-native-baidu-map用的是哪个版本??
node:v8.10.0 react: 16.6.3 react-native: 0.57.8 react-native-baidu-map: 1.0.6
节点:v8.10.0 react :16.6.3 react -native:0.57.8 react-native-baidu-map:1.0.6
是直接link的吗,在AndroidManifest.xml里应该配置了百度的sdk吧,然后就可以直接运行了?
直接link的。
直接link的。
非常感谢
按照你的修改后,出现BaiduMapView does not exit的bug,请问是怎么解决的
这个项目是多久没维护了? 这么多开着的issue。。。
请问这个问题解决没,同样是遇到这个问题 RCTBaiduMapViewManager.h文件找不到
@superzhy 老哥你解决这个问题没?同样遇到这个问题了。。。
你好,我导入的是android,link的,但是报Invariant Violation: Invariant Violation: requireNativeComponent: "BaiduMapView" was not found in the UIManager. 请问您是怎么解决的呢?
同样的问题,有人知道怎么解决吗
我也碰上了。pod install 方式安装的,都碰上了这个。把pod 目录中的baidu-map目录加进header search path中,也不行。还在想办法。
哪位搞定了么?
@kingctan https://github.com/lovebing/react-native-baidu-map/issues/256#issuecomment-500675472 看看这个能不能帮到你
(最近更新此组件,开发中遇到一些问题,一些资源方法与大家分享) 开发环境 node:v8.10.0 react: 16.6.3 react-native: 0.57.8 react-native-baidu-map: 1.0.6
iOS/xcode pod 导入成功,打开工程后 RCTBaiduMapViewManager.h 找不到时, 在 APPDelegate.m 文件,引入(一些code 如下)
import <react-native-baidu-map/BaiduMapViewManager.h>
... // 地图 ak 注册 [BaiduMapViewManager initSDK:@""]; ...
补充 CocoaPods有关补充 git url: https://github.com/CocoaPods/CocoaPods 官网:https://guides.cocoapods.org
使用 gem 升级 cocoapods 遇到问题,参考url:https://yq.aliyun.com/articles/652635