Can't seem to download the tiles for my map application - android

this is my first question and I've been messing around with android for just a couple of days now.
The problem arose when I tried to follow an example code to experiment with the MapView class (http://developer.android.com/resources/tutorials/views/hello-mapview.html).
I installed the Google APIs add-on in my SDK and did everything just as stated in the tutorial and the AVD ran the code perfectly, except for the fact that I got an empty grid instead of the actual map I thought I was supposed to see.
It looks like my debug key is wrong or something, but again here, I did everything just as stated in the tutorial. In fact, here's the line in my main.xml where the api key is specified:
android:apiKey="48:C6:36:64:4A:DA:92:EF:D7:9E:BA:CD:26:45:EB:0D"
I got this key using the keytool command just like this:
$ keytool -list -alias androiddebugkey -keystore /home/nelson/.android/debug.keystore -storepass android -keypass android
I tried the built in map application that comes with the AVD when you install the google API and it works perfectly, so there must be something wrong with my application, but I just have no idea of what. Any help?
Thanks in advance
Nelson R. Perez

android:apiKey="48:C6:36:64:4A:DA:92:EF:D7:9E:BA:CD:26:45:EB:0D"
That's not your API key. Thats the fingerprint of your signing key.
Follow the Maps API key instructions starting from here, and you should be OK.

Related

Application misconfigured

I am developing an app where you are supposed to login with your Google account.
Last week I developed it on my Mac and it worked fine login in. Now I have changed to my desktop computer since I like it more. However, although I have updated the credentials with keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore and configured the project here it does not work.
I always get error code 10 and cannot login. Does anyone have a clue where to search for the error?
The error is on my device and the path and files should be correct. I have followed the instructions from Google to get the debug keys.
Can it be blocked for some reason since I have changed computer?
I "solved" it by starting a new project. Google requires a different key for different computers and it seems troublesome to just update the keys. Does anyone have a good idea of how to smoothly go between computers and only work on one project? Having two projects and a symbolic link to the source code?

how do i find my SHA 1 for my android app in android studio?

I'm new to developing Android apps and I wanted to create a Google map inside of a Fragment. So far I've gotten the part where I need the API key and I'm confused by the instructions from the Android developer site and everything I've found online hasn't cleared my confusion.
Could someone provide me with a step by step of how to get my SHA1 fingerprint on Windows 7?
You cannot obtain the API_KEY until you get your SHA1.
Click here to get a nice tutorial that will guide you step by step with images (Specifically when you are operating on Windows 7).
Hope this would Help!!
There are two kinds of fingerprints, debug and release. Assuming you want a release one, then from a console window, you need to run this command to get the fingerprint
keytool -exportcert -alias MY_RELEASE_KEY_ALIAS -keystore MY_FULL_PATH_TO_RELEASE_KEYSTORE_FILE -list -v
The keytool program is in your JDK bin folder. So on Windows, something like C:\Program Files\Java\jdk1.8.0_20\bin is where you should find keytool
Last thing to note is that MY_FULL_PATH_TO_RELEASE_KEYSTORE_FILE in the command above should be the full path to your .keystore file, including the file name
After all that, you will be finally be provided with several fingerprints, including the SHA1. You can copy that, and go back to Google Developers Console and paste it as a new line in the allowed Android Applications, with your package name added to the end, separated by a semi-colon.

Google maps has stopped working on android after I switched from windows to linux

I am developing an app which requires google maps on android. Earlier I was developing on Windows and everything was working perfectly. A few days ago I switched to ubuntu and the maps suddenly stopped working. I have added the sha1 key to the console -
API key:
AIzaSyDD3ntjHTCKntDoVJt7J_eMZs-t7lYIlZ8
Android apps:
98:26:30:05:AF:D7:74:3F:5F:C1:BF:D6:24:80:5E:9B:DC:F4:F4:D6;com.opaxlabs.boatbrat EB:53:F8:2A:B3:05:63:5E:3F:CF:17:47:63:A8:8B:FA:C8:67:30:D4;com.opaxlabs.boatbrat
Activated on: Jun 25, 2014 5:07 AM
So that I have two sha1 fingerprints. I switched back to windows to check and the app was working perfectly there. The error in log cat states that -
Google Maps Android API(10773): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).
The build when run on devices shows a blank screen where there should be a map.
The api key is mentioned in the manifest as -
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDD3ntjHTCKntDoVJt7J_eMZs-t7lYIlZ8" />
Also in the emulator it asks me to update the api showing me a button to update which when clicked crashes the app. Please help me with your suggestions. Thanks in advance.
Edit:
The problem seems to be in the fact(Although I am not sure about it) that I had created a demo project on the google console and put the sha1 in it. Later I created a project and put a sha1 in that too. It seems that it was taking the key from the demo project and not the proper project. I have deleted the contents of the demo project but to no avail. Is there a way to correct this problem?
Open terminal
navigate to /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin (bin of java )
write On terminal :- keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android
4.copy the SHA1 key and paste in place of the previous SHA1 of your windows
dont change anything else.
its working......
Seems like an issue with the api key.
Generate sha1 of the debug certificate on your ubuntu, and add it to the api console as another key in addition to the sha1 of certificate from windows.
That should solve the problem.
Regenerate sha on your pc,
Go to google console,
Create new Android key (for google map),(delete the old)
For Linux:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Copy sha with name of your project , for example: (Sha;projectname)
98:26:30:05:AF:D7:74:3F:5F:C1:BF:D6:24:80:5E:9B:DC:F4:F4:D6;com.example.androidapp
Copy API key to app.
In google console your Android apps have 2 times sha and project name.

which version should I choose to show google maps view in my android app?

I've tried V1 and V3, and both of them got me the same result: no map , no error , just grid.
I'm sure that I put the key.
Is the problem in the version. Should I use V3?
I don't find clear tutorials for V3 like V2 & V1. (Videos are the simplest way)
If V2 is still working, what do u think is the problem?
You should be using V2. and Your api key is most likely the culprit for this issue.
I've seen it multiple times. Verify your api key is included correctly and is the right api key to use with your app.
The easiest way to get started using Google Maps API v2 is to generate a debug key using the debug keystore. On Windows the debug keystore is called debug.keystore and should be located in the following directory:
C:\Users\your_user_name\.android
Once you locate the debug keystore get the SHA1 by entering the following command in the command prompt:
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
Use this SHA1 to generate your API key and you should be able to finally see the map.
More detailed information about creating a debug and release API key can be found here.

Google Map does not display in Android?

i am trying to run google map tutorial using following link
http://mobiforge.com/developing/story/using-google-maps-android
followed all steps but when i try to run this application it does not display anything except boxes and zooming button
can any one guide is there any thing i am missing?? i have obtained new google map key from google website too.
finally i got my answer,
i had not created MD5 Certificate thats why it was showing only boxes after create MD5 certificate everything is working fine.. :D
the procedure is given below.......
keytool.exe -list -alias androiddebugkey -keystore D:\Androidkeystore\debug.keystore -storepass android -keypass android
if you have not set environment variables for java in your machine then above command wont work or you will have to go to the bin directy of your java folder in program files to run above command.
by copy pasting debug.keystore file from builtin folder to user friendly folder and ran it.
and finally i got the md5 certificate.
yup this is a symptom of not having a google maps api key for your application.
As I'm sure your aware you can find everything you need here for obtaining a google maps api key.

Categories

Resources