Discussion Forums  >  Maps, Device Location, Tracking

Replies: 16    Views: 906

Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
10/04/12 01:20 PM (11 years ago)

Google maps API - Eclipse - Grey Grid

I'm running into an issue with the Maps Activity using Eclipse, and v2.0 (android) When I access the maps activity within my app, the only thing you see is a grid. I have a debug and release key set in the strings.xml file, and my screen_map.xml file says android:apiKey="@string/googleMapsAPIKeyRelease" I have debuggable set to false. I have reinstalled the app on my device and ran it again, still showing a grey grid. I have noticed the logcat says "Map Activity : Couldn't get connection factory client" The error log says " screen_map.xml: Failed to find style 'mapViewStyle' in current theme I am using eclipse and BT v2.0 Any suggestions?
 
WolfTimJ
buzztouch Evangelist
Profile
Posts: 810
Reg: Feb 20, 2011
Rockwall, TX
17,400
like
10/04/12 02:25 PM (11 years ago)
On the simulator or a device? I've never got the simulator to display correctly, but it subsequently works on a test device and when published. There is a thread that addresses this I believe, from about a year ago.
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
10/04/12 02:36 PM (11 years ago)
Yes i am using a device with Android version Froyo. By published, do you mean on Google Play?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/04/12 03:41 PM (11 years ago)
Hi @MadPadge, What we've all concluded in our testing is that seeing the map tiles only works when you install an apk that has been signed with your release key on either an emulator or actual device. I've only once been able to get it working with the debug key, and almost never get it working by running directly from Eclipse. Installing via an apk seems to be the only option. Mark
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
10/04/12 05:13 PM (11 years ago)
Ok, so in testing the grids are going to display when ran through eclipse. by installing via apk, so you mean, when the app is published to google play?
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
10/04/12 09:47 PM (11 years ago)
You should test the app thoroughly before submitting it to google play. Inorder to test the app first it should be signed with the keystore, then install the apk on your device either by sending mail, posting apk on dropbox or by copying the apk to your sd card. Then test the app to see whether the map is working. If its working you are now set free to publish the app. In case its not still working, you will need to figure out the reason for that.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/04/12 10:01 PM (11 years ago)
Hi @MadPadge, IF you install your app in your Emulator via the apk method, and not via Eclipse, and assuming you signed it with your release key, you will see the map tiles and not just the grid. You can also test your app using the apk on any Android device you might have. Just email yourself the apk, click on it from within your email, and it will install. I have NOT been successful at getting the map tiles to show up in my app running in the Emulator via Eclipse. Here's a video I did that shows how to install an app into your Emulator via an apk: http://www.youtube.com/watch?v=5Ohlah9xTv0 And, on a related note, @Sandeep is exactly correct in making sure you fully test your app before submitting to any store. Let us know if this helps! Mark
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
10/05/12 01:35 AM (11 years ago)
I have had map tiles working on both simulator and devices (mine is froyo) with the debug key, but I had a long journey before I got anything to work, for which I needed @GoNorthWest's help (thanks again Mark). I found if android.debuggable in the manifest is set to true and you use your debug key, I believe maps work OK in the simulator and device. If you are going for a release version, then when you install the release key and set debuggable to false, change the setting in the screen_map.xml to ‘Release’ and sign your app for release, I'm not sure it shows the map in the simulator any more. However if the release key is right it does work on the device. Anyway, just thought I'd add my 4 penneth!
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
10/05/12 01:38 AM (11 years ago)
btw, slightly off topic, but has anyone had success with loading map pins from a URL? It works OK for me on IOS but not at all on Android.
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
10/05/12 06:21 AM (11 years ago)
Thanks for the information guys. I will let you all know how it goes in a moment.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/05/12 09:19 AM (11 years ago)
Hi @AlanMac, I had it working that way once as well, and then it stopped. The only reliable way I've found is the signed apk method, but that sure doesn't mean it's the only way! I'm going to do some investigation, see what I can come up with, and then write a tutorial about it. This issue comes up quite often. Mark
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
10/05/12 09:22 AM (11 years ago)
Mark, let me share my notes on this with you - I'll send you an email. I'd love to know how to get a tutorial published, I have one prepped for parse push on Android.
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
10/08/12 09:19 AM (11 years ago)
Ok I have figured out what the issue is. Make sure eclipse is using java version 6 (jre6) Window -> Preference -> Java. (I was using Jre7 but built a keystore for jre6, big mistake) When using google maps api, you must use jre6 and retrieve the MD5 fingerprint. Take that finger print and paste it into the strings.xml file, use the ID from the strings file and apply to the appropriate layout.xml file. Export the file and deploy on the device without the emulator. Works like a charm! Thanks for the assistance guys
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
10/08/12 09:20 AM (11 years ago)
I have also found that is you are using jre7, you must make sure eclipse is using jre7 and retrieve keystore using the verbose (-v) option.
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
10/08/12 09:28 AM (11 years ago)
Thats great that you figured out the cause of this error. Thanks for informing all of us about it.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/08/12 11:59 AM (11 years ago)
This is all good stuff! I'm sending a tutorial on the way! Mark
 
Mad Padge
Aspiring developer
Profile
Posts: 61
Reg: Jul 03, 2012
Winston Salem, ...
2,760
like
10/08/12 12:10 PM (11 years ago)
Awesome. If you have a moment, take a look at this thread. I'm getting an error uploading to google play. https://www.buzztouch.com/forum/thread.php?fid=7FC96E69B5AEA2710E0017C&tid=7FC96E69B5AEA2710E0017C Thanks for all your help guys
 

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.