【问题标题】:Error “Google is not defined” after Android target API level 28+”Android 目标 API 级别 28+ 后出现错误“Google 未定义”
【发布时间】:2019-11-21 09:07:14
【问题描述】:

“从 2019 年 8 月 1 日开始,Google Play 要求新应用至少面向 Android 9.0(API 级别 28),并且应用更新从 2​​019 年 11 月 1 日起面向 Android 9.0。在这些日期之前,新应用和应用更新必须至少面向 Android 8.0(API 级别 26)。”

我改到28后

<preference name="android-targetSdkVersion" value="28" />

Google 地图停止工作并抛出此错误

ERROR Error: Uncaught (in promise): ReferenceError: google is not defined

【问题讨论】:

  • 你解决了吗?

标签: android google-maps ionic-framework


【解决方案1】:

几个小时后我解决了它,只是在 AndroidManifest.xml 中放了两件事

打开

platforms/android/AndroidManifest.xml

在标签Application放

android:usesCleartextTraffic="true"

在标签Application里面放标签

<uses-library android:name="org.apache.http.legacy" android:required="false" />

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-10-22
    • 1970-01-01
    • 1970-01-01
    • 2020-01-27
    • 2022-12-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多