【问题标题】:g-places-autocomplete not working on android buildg-places-autocomplete 不适用于 android 构建
【发布时间】:2018-01-08 05:47:31
【问题描述】:

我正在 ionic 上创建应用程序,并使用 g-places-autocomplete 进行 google place 自动完成。

它在浏览器上运行良好,但在我通过ionic build android 命令在android 应用上构建后无法在应用上运行。

【问题讨论】:

  • 能否提供一些代码供参考?
  • 您好@sam,感谢您的回复。下面是 HTML 代码 === === 它在桌面和移动浏览器上完美运行。但是在我构建了android的应用程序后它就不起作用了。
  • 您确定要传递参数库=places http://maps.googleapis.com/maps/api/js?key=XXXXXXXXX&libraries=places并安装cordova whitelist plugin
  • 你好@sam,是的,我在 googleapi URL 中传递参数库。我也安装了白名单插件。在我的 config.xml 中还有 .

标签: ionic-framework autocomplete google-places-api


【解决方案1】:

在使用 android 测试应用程序调试后,我收到错误消息,即我没有按照 android 结构添加引荐来源网址,即“file_url//android_asset/XXXXX”。

在我添加了上述类型的 URL 后,它就开始工作了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-05-27
    • 2017-08-13
    • 2019-09-19
    • 2014-02-28
    • 1970-01-01
    • 2018-12-20
    • 2021-09-01
    • 2019-09-07
    相关资源
    最近更新 更多