作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我升级到 react native 60 和 Pods。现在恢复为时已晚。我得到错误
@react-native-community/geolocation NativeModule.RNCGeolocation is Null.
最佳答案
我遇到过同样的问题。我实际上在使用另一个库,它依赖于 @react-native-community/gelocation
,即 react-native-geolocation-service
.我实际上并没有遵循安装步骤。当我这样做时,它起作用了。我猜由于您正在升级并且已取消链接,因此您需要将其添加到 Podfile 中,因为它 可能不支持自动链接。
对于 RN 版本 > 0.60,来自 geolocation service docs ,
Update your 'Podfile' (Add the following to the Podfile)
`pod 'react-native-geolocation', path: '../node_modules/@react-native-community/geolocation'`
Then run
pod install
from ios directory
关于react-native - NativeModule RNCGeolocation 为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57781423/
我升级到 react native 60 和 Pods。现在恢复为时已晚。我得到错误 @react-native-community/geolocation NativeModule.RNCGeolo
我是一名优秀的程序员,十分优秀!