ReferenceError: google is not defined Android Pie

Hello Ionicers!

I’ve been running an implementation of Google Maps Address autocomplete. it has been working just swimmingly, until the new Android API 28/29. When I run the @ionic/angular app on an Android Pie device I get the “ReferenceError: google is not defined” error.

When I run the same app on an Android 8 device it runs perfectly fine.

What do I need to do differently??

declare var google: any;

updateSearch() {
    console.log('updateSearch - ', this.autocomplete.query);
    if (this.autocomplete.query == '') {
      this.autocompleteItems = [];
    let me = this;
      input: this.autocomplete.query,
      componentRestrictions: {
        country: 'uk'
    }, (predictions, status) => {
      me.autocompleteItems = []; => {
        if (predictions != null) {
          predictions.forEach((prediction) => {

Did you solve this error?

I solved it, after some hours, just putting two things in AndroidManifest.xml



In tag Application put


and inside tag Application put the tag

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