amay077 / Xamarin.Forms.GoogleMaps

Map library for Xamarin.Forms using Google maps API
https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/
MIT License
544 stars 344 forks source link

Android + Simulator : we do not see the map #771

Closed vd3d closed 3 years ago

vd3d commented 3 years ago

Hi,

I'm testing the sample application, I have only change the API key and when I try to use the Android version with the simulator, I got a green empty widget, there is no map.

I'm looking for a solution... I have seen several posts, but no way. I have also try to upgrade the nugget to V4-BETA1, but I can't compile with this nugget version.

Any idea is welcome ;-)

image

BTW, running it with Nougat 7.1 works... but not for the upper version.

I have tested those, but none of them works:

1) https://developers.google.com/maps/documentation/android-sdk/config#specify_requirement_for_apache_http_legacy_library

2) https://github.com/amay077/Xamarin.Forms.GoogleMaps/issues/639

I have also check if the Google Play Service is installed, but I got the following error "SERVICE_INVALID", and I don't know what it means?

    public bool IsPlayServicesAvailable()
    {
        // Verifies that Google Play services is installed and enabled on this device, and
        // that the version installed on this device is no older than the one required by this client.
        var resultCode = GoogleApiAvailability.Instance.IsGooglePlayServicesAvailable(this);
        if (resultCode != ConnectionResult.Success)
        {
            if (GoogleApiAvailability.Instance.IsUserResolvableError(resultCode))
            {
                System.Console.WriteLine(GoogleApiAvailability.Instance.GetErrorString(resultCode));
                //Log.Debug(TAG, GoogleApiAvailability.Instance.GetErrorString(resultCode));
            }
            else
            {
                //Log.Debug(TAG, "This device is not supported");
                Finish();
            }
            return false;
        }
        //Log.Debug(TAG, "Google Play Services is available.");
        return true;
    }

Thx

osekom commented 3 years ago

The emulator does not have google services, create an emulator with google services compatibility