【问题标题】:react-native-geocoding going into error in production for androidreact-native-geocoding 在 android 的生产中出错
【发布时间】:2021-12-27 09:00:36
【问题描述】:

我正在使用 react-native-geocoding 进行反向地理编码。

它在本地和测试中运行良好。

但是当我在 android 中切换到生产时,我收到以下错误。

import Geocoder from 'react-native-geocoding';
 Geocoder.init('key');
Geocoder.from(‘data’)
        .then((response) => {
      
        })
        .catch(error => {
    
        });

响应 {"code":2,"message":"获取时出错。请检查您的网络。","origin":{}}

有没有我遗漏的配置。

【问题讨论】:

    标签: reactjs react-native geocoding


    【解决方案1】:
    import Geocoder from 'react-native-geocoding';
    

    检查你的库可能是你安装了 react-native-geocoder 并且你导入了错误的库或者你使用了错误的事件检查 react-native-geocoder 的文档。

    检查这个:

    import Geocoder from 'react-native-geocoder'; 
    

    【讨论】:

      猜你喜欢
      • 2021-06-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-13
      • 2016-09-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-02-24
      相关资源
      最近更新 更多