Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Map on Android do not load

I had a working Google Maps in my application and I had to start to work with an other computer.

So I downloaded my sources on this new computer with Android Studio and so one.

And now, I am not able to make the Android Map displays anymore.

I added the SHA1 from my new computer in Google Console but it still doesn t work...

I have this kind of message in my logcat :

Error processing: com.google.maps.api.android.lib6.b.d@536cbcf8 not retrying
Error processing: com.google.maps.api.android.lib6.gmm6.d.h@539c5f14 not retrying

I think my Manifest is OK because this config used to work but here it is :

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.front" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>

...

<meta-data
   android:name="com.google.android.gms.version"
   android:value="@integer/google_play_services_version" />
<uses-library android:name="com.google.android.maps" />

Does anyone have an idea?

EDIT : ANSWER

OK so I didnt think it was, but it really was a problem with the SHA 1 key. When I changed computer, I only added my signed APK key and forgot to add my debug APK key and I was compiling in debug release. Thank to all of you :)

like image 348
Labe Avatar asked Oct 02 '14 23:10

Labe


Video Answer


3 Answers

since 2 different machines have two different debug keys, you should copy your old debug.key file from previous machine android sdk to new machine android sdk folder or else you should go to new map api key with new machine debug.key file

like image 153
Dehan Wjiesekara Avatar answered Oct 19 '22 15:10

Dehan Wjiesekara


Make sure you have enabled Google Maps Android API v2 in the APIs list on your project's Google page.

This generated the same error you got. I wasted a couple of hours with this so hopefully it will save someone's time in the future.

like image 42
Vlad Schnakovszki Avatar answered Oct 19 '22 14:10

Vlad Schnakovszki


go to your GoogleMapsAPI credential and input your package along with your android keyhash.

like image 39
Boldbayar Avatar answered Oct 19 '22 16:10

Boldbayar