Discussion Forums  >  Uncategorized

Replies: 12    Views: 324

Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
11/12/11 08:44 PM (14 years ago)

grey tiles in maps and how to get release key

Ok, first I have to apologize for posting another google maps issue, but I have read other posts and cant find a solution. This is my first app, I am running eclipse on Mac for the android market. I have my debug key and I have installed it in my manifest, Are there several places I need to put this? I have also referenced the map library as such <uses-library android:name=com.google.android.maps /> This is driving me nuts trying to figure this out. I went ahead and published my app without the maps working (hoping for some reason once on the market they would work, I know fat chance) How do I get my release code? All I keep seeing is get your release code once you publish HOW? Thanks in advance, man this stuff is addicting... Jim
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
11/12/11 08:53 PM (14 years ago)
I guess I should have added that I have the location pins, and they give the correct address, just no map behind them. Link if you want to see what I am talking about- Under locations / contact us https://market.android.com/details?id=com.v1_4.BD9EAB0BD9D576CBE6036549.com&feature=search_result#?t=W251bGwsMSwyLDEsImNvbS52MV80LkJEOUVBQjBCRDlENTc2Q0JFNjAzNjU0OS5jb20iXQ..
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/13/11 01:34 AM (14 years ago)
Hi Crown...So close it sounds like. Maps in Android are a major pain for sure. A few concepts.. a) It's one thing to get the keys (sounds like you have one (debug) but not the other). b) it's another thing to know what to do with them! Funny. Because you have the debug key lets start there. The approach is the same debug or release after you have them. There are two things you need to do that you have not already. Becuase you compiled OK you must have already made the adjustments in the readme...good. Next, you need to paste the keys in the strings.xml file. You may have already done this too. Last, you need to find the map screens layout file in the /res directory. I think it's called /res/screen_map.xml. Open this file..you'll see in the XML where the map is either pointin g to the debug key or the release key. If you compile for debug you need to set this to 'point' to the strings/debug key for release, point it to strings/release. In other words, this depens on how you're building. For your phone or for the market. So...strings.xml updated with both keys. screen_map.xml is pointing to proper key based on your build settings. This will ALWAYS work. If you use the Export Signed Application tool to compile for the market you'll want to use the Release key and screen_map.xml will need to point to the release key. how to get keys: This sums it up better than I could: http://code.google.com/android/add-ons/google-apis/mapkey.html Getting the keys is something you do BEFORE you publish, not after. Maybe you're confused by this? Follow the directions on that page for how to get both keys. You'll literally have to funky strings to paste into your strings.xml file. They will look like: 0jV_4XZu7HzL9_l2vhUjCOSrXqipJxByoJU8rhf If this is all way too confusing...check your email, I sent you some tips. Ignore typos in all my posts...I don't backspace and fix anything!!!
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
11/13/11 08:41 AM (14 years ago)
thanks! I am back at it this morning. I thought I had the debug key set properly and the strings.xml pointing to debug, but I will try it for release and see if it works for me. Buzztouch is an amazing product. I downloaded it on friday, worked with it that night and by lunch on Sat I had a functioning catalog on the android market (well except the maps, lol) The only code I have ever written was back in grade school on an Apple II. Hows that for a throw-back. Thanks for the email! that does explain it. I watched a video on youtube about it, but wasn't following the command prompt deal very well. They kept talking about finding the java file, and I couldn't find it with on my Mac. Jim
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
11/13/11 12:05 PM (14 years ago)
A few more attempts with no success, now I am getting keystore does not exist. I even tried putting in the alias and password as I have seen in a youtube video, and that didn't help either. I also tried exporting the file again into a new spot and tried that location for the keystore, but no go... Macintosh:~ jimking$ keytool -list -keystore /users/jimking/documents/my_release_keystore/IRG_CAT_KEY/ keytool error: java.lang.Exception: Keystore file does not exist: /users/jimking/documents/my_release_keystore/IRG_CAT_KEY/ Macintosh:~ jimking$ Any idea what I have messed up now?
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
11/13/11 12:48 PM (14 years ago)
I'm making progress, I have my release key now by doing it all through terminal and that worked. I entered it into eclipse, but when I changed the string in location_map I get an error This is what I did <com.google.android.maps.MapView android:id=@+id/mapView android:layout_width=fill_parent android:layout_height=fill_parent android:clickable=true android:apiKey=@string/googleMapsAPIKeyRelease (changed from debug to release Is this how I do this??) This is where I should be pointing to release correct? Thanks, Jim
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
11/13/11 12:55 PM (14 years ago)
a save and a clean made the error go away. now should the maps work with the release code in the emulator if I did it properly, or will it only work with debug in eclipse? sorry I keep replying to my own post, but typing my way through it is helping. Jim
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
11/13/11 05:22 PM (14 years ago)
OK, so it looks like I screwed up one more thing. I changed the version and tried to update my app, but because of the issues I was having with the keystore I made changes to the new version and Android Market is saying all the versions need to be signed by the same cert. My workaround was trying to install a new app, but it is telling me I already have an app from the same build so go upgrade that one? Should I just un-publish the first one and upload the new one?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/14/11 12:41 AM (14 years ago)
A few things here. Firstly...yes, @string/googleMapsAPIKeyRelease is what you want in map layout file. Cool. Next, updating your project in the market just requires you to change the version at the top of the AndroidManifest.xml file. If it says 1, change it to 2, then 3 then 4 each time you upload a new version. Don't remove the app from the market, it's a major pain from my experience. As far as the same cert goes, you should be using the Android Export Signed App tool each time right? This should sign it automagically for you.
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
11/14/11 05:27 PM (14 years ago)
I used the android export to sign the app, but I ran into an issue when I went back to the file and started modifying it. I ended it screwing the whole thing up and I didn't know how to fix it. So I thought if I removed it and re-downloaded the code from Buzztouch I would be right back in business, well in doing so it appears I signed the new version with a new certificate. Now I cant remove the .apk file from android and it wont let me upload a new app with the same package name. Is there an easy way in eclipse to change the package name? I saw in the manifest where it showed the the package name right on the top, so I thought I would just change one number and be on my way, but once Idid that the errors started flying. I guess it points to the package name all throughout the file. Now I'm lost again. leave it to me to screw this up... Jim
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
12/07/11 02:49 PM (14 years ago)
I as well have hit this wall on BT 1.4 trying to use a Simple Google Location map. David - are you saying that if you at least have a DEBUG key and have entered that in the proper files, edited the proper files and the project complies- we should see the maps working on the simulator? regardless of if we have a release key or not enetered in the project? and those of you that have generated a release key - was it using the keytool command line utility? i'd love to see more HOW TO's the Release Key
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/07/11 06:43 PM (14 years ago)
@ ATRAIN53 : Yes, the simulator will show the map tiles if you have the debug key entered. You need to enter the debug key in only one place - the strings.xml file. When you compile, because the map's xml layout file is 'pointing' to the release key in the strings file, it will show the tiles. For release, it's tough for some folks to find the Release Keystore. In other words, where in the heck does Android put this stuff. When creating your release key's, it's best to do this: 1) Use the built in Android Export Signed Application option. Right click the project name, Export Signed Application is in the Android Tools menu. 2) When exporting the signed app, it will ask you what 'keystore' to use. If you've not done this already, use the Create New Keytstore option. This will create the keystore. The path to this keystore is what you need when you use the Keytool to create the release key.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
12/08/11 07:44 AM (14 years ago)
thanks for the clarification David. so if i have blank tiles in my simulator i have issues that are not in any way related to the release key and lack of having one. i should be seeing working maps in my simulator with just a debug key. that's what i thought from watching the demo. so i either missed a step or mixed up a step. it was helpful to me to learn that the command line version of the keytool is located in. C:\Program Files\Java\jdk1.7.0_01\bin jarsigner is in there too. i saw the post with the request for HOW To's on Google Maps. There was a nice response in there already with some additional tips that will hopefully help me get this going today... again, thanks :)
 

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.