Search code examples
androidxamarinxamarin.androidandroid-maps-v2

xamarin google map not working


I created a map using the following link http://developer.xamarin.com/guides/android/platform_features/maps_and_location/maps/part_2_-_maps_api/ i followed all the procedures mentioned in it but what am getting is a blank screen. My application Output shows the following log on executing the map activity.

Open Connection [REQUEST] DRD(41): 62|147 [REQUEST] Close [REQUEST] Error processing: com.google.maps.api.android.lib6.b.d@42a1cef8 not retrying [REQUEST] Retrying: com.google.maps.api.android.lib6.c.au@429ced70

Can anyone please tell me why this is happening.


Solution

  • If you are unable to view the map after deploying a Release apk, follow this Video.. https://www.youtube.com/watch?v=xLJ0jDFdUZ0

    As it says :

    1. Create a KeyStore from Visual Stuido.

    a. Put project config mode to Release.

    b. Clean and Build your Android project.

    c. Right click your Android project and select Archive (Before that specify the version code and version name in your manifest or in properties).

    d. Once the archive is completed, click on Distribute.

    e. Select AdHoc channel.

    f. Create a new Signing Identity with Alias, Password and other info.

    g. This signing key creates a KeyStore file in location : C:\Users\[UserName]\AppData\Local\Xamarin\Mono for Android\Keystore\[Alias]\[Alias].keystore Note : [Alias] is the name you defined when creating the KeyStore file

    1. Open your cmd. cd to C:\Program Files\Java\jdk1.8.0_131\bin

    2. Execute : keytool -list -v -keystore "C:\Users\[UserName]\AppData\Local\Xamarin\Mono for Android\Keystore\[Alias]\[Alias].keystore" -alias [Alias]

    3. You will get the output with MD5, SHA1, SHA256... Copy the SHA1 key.

    4. Go to https://console.developers.google.com . Select your project you created for Android API key.

    5. Click on credentials and select your API key.

    6. Add new Package name and finger print with your project's package name and SHA1 key you copied. Note : Project's package name defined on Android Project's manifest and properties.

    7. Wait for like 5 mins to take the changes to affect. Afterwards you can again archive and get a new APK. Install on your android device and see. You will now be able to see the map.

    NOTE :: I am referring to Xamarin, Visual Studio 2017