[英]Why is android looking for RNCGeolocation when I use react-native-geolocation-service?
試圖讓一個 android 版本的 react-native 0.61.2 應用程序運行......
該應用程序打算使用react-native-geolocation-service
但無法克服此錯誤:
“錯誤:@react-native-community/geolocation:NativeModule.RNCGeolocation 為空。”
我知道react-native-geolocation-service
在 iOS 上使用@react-native-community/geolocation
但這是 android。 我已經在整個項目中搜索了字符串 RNCGeolocation,但它不存在。 如何在 android 上使用react-native-geolocation-service
運行?
對於任何處理此問題的人,我已經嘗試了所有解決方案,但仍然無效。 我發現 Geolocation 使用了本地位置 api(ou native 模塊),有時問題是 api 似乎不在“那里”。 所以我安裝了 react-native-location,它似乎提供了(一些相同的?)本機 api 的功能,之后,我安裝並能夠使用 @react-native-community/geolocation。
希望能幫助到你 :)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.