Android目标API级别28+之后出现错误“未定义Google”

时间:2019-07-11 15:31:02

标签: android google-maps ionic-framework

”“从2019年8月1日开始,Google Play要求新应用必须至少针对Android 9.0(API级别28),并且应用更新必须自2019年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

1 个答案:

答案 0 :(得分:0)

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

打开

  

platforms / android / AndroidManifest.xml

在标签Application中放入

  

android:usesCleartextTraffic="true"

内部标签Application放置了标签

  

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