farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
01/29/14 02:42 PM (11 years ago)

Android v3 Maps VS me

Hi, I am having an epic battle with my first Android app and it looks like I am going to win BUT my app is putting up one last fight with the Google Maps. I think I did everything right, can somebody please confirm and/or advise? - Referenced the Google Play Services Library as per Smug's tutorial: https://dl.dropboxusercontent.com/u/115208762/OSMBT/GPSRefBT.pdf - Got my API key. https://developers.google.com/maps/documentation/android/start#obtain_a_google_maps_api_key - Enabled Google Maps API v3 & Google Maps Android API v2 in my Google APIs Console. - Copied and pasted the Api key in my AndroidManifest.xml. When I run the map on my devise I get the following error message: "Google Maps not Available There was a problem creating a Google Map. In most cases this error occurs because the Android Project was configured properly to run Google Maps." I have a copy of the logCat but I am not sure if it is safe to post on a public forum. Any help to slay this dragon would be greatly appreciated. :) Cheers, Farcat
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
01/29/14 03:07 PM (11 years ago)
Hi Farcat, Couple things to check: * Maps won't work on the emulator. You need to be testing on a real device. * The app has to be signed with the same keystore that you used to generate the Google Maps API key with. So, if you used the SHA1 key from your debug keystore to generate the API key, then you have to sign your app with the debug keystore. If you used the SHA1 key from your release keystore, then you need to sign the app with the release keystore. Hopefully one of those was the issue! If not, maybe you can send me the LogCat output? Mrkfleming at gmail dot com Thanks! Mark
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
01/29/14 03:42 PM (11 years ago)
Hi Mark, Thanks Mark for the quick reply. I know that there are plenty of posts on the subject but Android eludes me. I can't get the Emulator to work so it's device only for me. It looks like I have missed the signing step. All I did was to generate a Google Map for Android v2 Key: - I typed "keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v" in Command - inserted this code in Google APIs Console - copied and pasted the key to the manifest I am a bit confused with the signing concept, it's nothing like IOS I presume? Farcat
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
01/29/14 03:51 PM (11 years ago)
I just found your tutorial on signing which I am going to go through now: http://dl.dropboxusercontent.com/u/4993711/Signing_Android_Apps_v1.0.pdf
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
01/29/14 03:52 PM (11 years ago)
Hi Farcat, Android can indeed be a huge pain! I'm assuming you used the SHA1 key from your debug.keystore in order to generate your Maps API. The best way I've found to get the SHA1 key is using the keytool. Here's a video that shows how it works: http://www.youtube.com/watch?v=IaXE2FUENFI&feature=share Did you then generate an apk package using the debug.keystore to sign your package? Before you ship your app, you're going to need to sign it using a release keystore, and your Maps API will need to be generated from the SHA1 key from the release keystore you create. Confused yet? This stuff is crazy! If you want, I can create a release keystore for you. Send me an email, and I'll send you some questions to get it created. Then you can use the keytool program to get the SHA1 key, get the Maps API key, and then compile the app using the release keystore. That will generate an apk file that you can then load on your device to install the app. At that point, things should work! Mark
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
01/29/14 04:03 PM (11 years ago)
Hi Mark, I haven't used the SHA1 key from your debug.keystore, I just followed the instructions on the video mentioned in my OP. I'll watch your video now and go through your instructions. I haven't generated an apk package yet. Still not come to that bit. Thanks very much for the offer, I'll try to get this to work. I have postponed converting my apps to Android for too long and I want to crack this nut. Cheers, Farid
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
01/29/14 04:23 PM (11 years ago)
Keep at it! Let me know if you need more help! Mark
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
01/29/14 04:54 PM (11 years ago)
Thanks Mark. I will try all this and will give you a shout if I am stuck. Thanks, Farcat
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
01/30/14 03:16 AM (11 years ago)
Hi Mark, I am still having no luck. I have sent you an email if you have a chance to read it. :) Thanks, Farcat
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.