Android Google Maps Creates Blank Tiles [duplicate] - java

When I switched from my debug map key to my signed map key my maps stop working. I get the following errors in logcat:
09-03 18:18:04.112: WARN/System.err(4073): IOException processing: 26
09-03 18:18:04.112: WARN/System.err(4073): java.io.IOException: Server returned: 3
09-03 18:18:04.112: WARN/System.err(4073): at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
09-03 18:18:04.112: WARN/System.err(4073): at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
09-03 18:18:04.112: WARN/System.err(4073): at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
09-03 18:18:04.112: WARN/System.err(4073): at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
09-03 18:18:04.112: WARN/System.err(4073): at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
09-03 18:18:04.112: WARN/System.err(4073): at java.lang.Thread.run(Thread.java:1019)
I've double checked everything, permissions and library are in place. I've recreated the singed key and no luck.
Any ideas?

I had the same problem and I figured there wasn't any helpful answer around on the internet so hoping this should help everyone in the future.
When using GoogleMaps for Android, you need two keys - debug and release.
The "debug" key is kind of a misleading term. This key is also to be used when you develop the app in Eclipse. So essentially, use the debug key for development, testing, debugging.
When you're ready to launch the app to Market, set the android:debuggable="false" in the AndroidManifest.xml and use the Signed API key.
When using the signed API key, the MapView will show up ONLY when the app is installed from the Android Market. So, installing the app from Eclipse (Run As, Debug As, etc) or command line (adb install) won't show the MapView. Rest assured, once the app is in the Market - you download it and the MapView will show up.
With the signed API key, if you deploy the app from Eclise, you will get a "Server returned 3, IOProcessing Exception 26" as a warning - just ignore it.
Note: Also ensure there are no duplicate instances of the same MapView. If your app needs "x" no. of MapViews, generate "x" no. of new signed keys (one for each MapView) since GoogleMaps has a query limit for a single MapView instance.
For getting both the keys, follow the steps for Obtaining API keys for GoogleMaps on Android.
Happy Coding!
UPDATE:
The link above for obtaining api keys is now a deprecated procedure. Refer Obtaining API keys for GoogleMaps Android API v2 going forward.

Finally Its fixed.
I am using Windows machine, so I simply went to C:\Users\rohit\.android and deleted debug.keystore and default.keyset1 once this is done, I went to Eclipse and applied a clean build to my project and its done!

Signed map key is used for release app. So you will get such info. if you debug the app via USB-tethered with signed map key. Switch back to debug map key if you want to debug the app, and replace it with signed map key before you release an update or new version.

I had the same problem. In my case, what I was doing wrong was this. I was writing the keytool command like this:
keytool -list -keystore debug.keystore ...
instead of:
keytool -list -keystore ~\.android\debug.keystore ...
So I wasn't updating the Eclipse's keystore with my fingerprint.
I hope this helps someone :)

If you are using a debug key that somebody else has generated and provided to you, that is the reason for the blank map with the following exception.
java.io.IOException: Server returned: 3
You can use this link to get an API key : https://console.developers.google.com/apis/credentials
This link will take you to google credentials page, the new place to get API keys.

I just encountered exactly the same problem.
There is no user-written code that throws the Exception: it is generated in the Eclipse logcat and the result is that you do not see any of the Google map tiles. Like Jen, I regenerated the key, to no avail.
The platform is Android 3.2, the device is the Asus Transformer, the connection is WiFi.
FYI my Android 2.2 application works fine, retrieving the map on a Droid over 3G.
Here is the solution to my problem, hope it helps Jen:
In my case, if I install the release version onto the Transformer using the "Debug as" Eclipse icon, with the Transformer USB-tethered, the map is failing as described above (FYI this is a procedure I have used successfully many times with Android 2.2 and other devices).
So I tried this instead: I use the Eclipse File|Export... option to create a release APK, and then install that APK onto the Transformer using its Asus Sync application. Everything is fine. The map tiles appear.

one more thing:
After adding -v you must remember that the google API just need MD5 not SHA1.So please check what code you give to google.

I have same question but I think I found the answer!
Decide follow these step https://developers.google.com/android/maps-api-signup and receive your certificate's MD5 fingerprint
While development, if map's not showed, don't worried about this! Simple extract APK use android tools with key tool which's used in first step and use this APK file to install on your phone, you will see MapView
Anyway, while development time, maybe you don't see MapView, but it's till not problem and don't worried about this! Simple wait when finished app & build with your keystore and you will see map display correctly

For the poor souls that tried to build the map example from sdk extras: as soon as I renamed the package from com.example.mapdemo to com.mynmae.mapdemo, the map magically appeared. Yes, I lost an hour searching and trying and it silently rejected the package name.

I'm from the future! I've experienced the exact same problem. But this might be an issue for novice developers.
When you created a new google maps activity in the android studio, there's a link to get yourself an API key inside the google_maps_api.xml file. So what happens when you follow this link is that Google will create a "debugging" key for your project. Which, as Sagar Hatekar explained, is indeed, only meant for testing and dev.
To be more clear, Google identifies your project by the SHA-1 certificate fingerprint (also stated inside the comments of google_maps_api.xml)
So what I'm trying to say is that you CANNOT use the same key for several projects unlike the open/public APIs out there.
https://developers.google.com/maps/documentation/android-sdk/start
In this link, they have a small section with the topic of A slightly less fast way which might be a try to explain this phenomenon.
Therefore, if you are using the same key for a project which, the key is not meant for, try requesting a new key.

Related

Not able to fetch google account detials for signinm Android studio Firebase [duplicate]

I've made a chat app that uses Firebase's feature Real-time database.
I face a problem with google authentication. The problem started when I downloaded the app from the Play Store, the authentication was working perfectly when I was running the app in debug mode. When users try to sign in they get a toast message code:10 message:10.
I would like to note here that: I've added the SHA1 fingerprint. How can I solve this?
*Not sure if this is helpful but I've followed step by step this tutorial
You need three keys in order to make it work:
The debug key. Informations here.
The release key. Informations here.
Google Play App signing key. Informations here.
All these keys are needed in order to make the sign-in process work.
Other informations here.
After generating SHA1 for release key, I forgot downloading the new google-service.json file that caused the same error.
Make sure you follow the instruction https://developers.google.com/android/guides/client-auth to generate and add debug/release SHA1 to firebase console and download google-service.json after updated.
If you use Use app signing by Google Play option, you need an additional step:
After uploading app into google play console, go to Release management > App signing, copy SHA1 and paste to firebase console
Update
In the new google play console, the App signing key can be found as following:
Setup > App signing
Make sure you have added signed SHA1. If you are using debug one then it will not gonna work for live apk.
You need to put "debug.keystore" in this path C:\Users\USER_FOLDER_NAME.android
then in Android studio follow the below steps
1. Run your project
2. Click on Gradle menu
3. Expand Gradle Tasks tree
4. Double click on android -> signingReport
You can see SHA in Run Tab
for more information see link
For me the problem was that i registered app and enabled google signin on Firebase console but I was testing with the debug version of app which has slightly different package name (same name but ended with .debug) so it was not working because the debug app is not yet registered. so additionally to my release app i also added the debug app to the firebase project for the app and it generated it's own google-services.json which i download and set to src/debug/google-services.json.
I believe this might be useful to some one else.

firebase authentication google sign [duplicate]

I've made a chat app that uses Firebase's feature Real-time database.
I face a problem with google authentication. The problem started when I downloaded the app from the Play Store, the authentication was working perfectly when I was running the app in debug mode. When users try to sign in they get a toast message code:10 message:10.
I would like to note here that: I've added the SHA1 fingerprint. How can I solve this?
*Not sure if this is helpful but I've followed step by step this tutorial
You need three keys in order to make it work:
The debug key. Informations here.
The release key. Informations here.
Google Play App signing key. Informations here.
All these keys are needed in order to make the sign-in process work.
Other informations here.
After generating SHA1 for release key, I forgot downloading the new google-service.json file that caused the same error.
Make sure you follow the instruction https://developers.google.com/android/guides/client-auth to generate and add debug/release SHA1 to firebase console and download google-service.json after updated.
If you use Use app signing by Google Play option, you need an additional step:
After uploading app into google play console, go to Release management > App signing, copy SHA1 and paste to firebase console
Update
In the new google play console, the App signing key can be found as following:
Setup > App signing
Make sure you have added signed SHA1. If you are using debug one then it will not gonna work for live apk.
You need to put "debug.keystore" in this path C:\Users\USER_FOLDER_NAME.android
then in Android studio follow the below steps
1. Run your project
2. Click on Gradle menu
3. Expand Gradle Tasks tree
4. Double click on android -> signingReport
You can see SHA in Run Tab
for more information see link
For me the problem was that i registered app and enabled google signin on Firebase console but I was testing with the debug version of app which has slightly different package name (same name but ended with .debug) so it was not working because the debug app is not yet registered. so additionally to my release app i also added the debug app to the firebase project for the app and it generated it's own google-services.json which i download and set to src/debug/google-services.json.
I believe this might be useful to some one else.

Android Keystore Debug duplicates

Software: Eclipse, keytool from java SDK
Language: Java
Platform: Android
Searched already: Google and StackOverFLow, all related finds are about finding or restoring debug keystores, this probleem seems non existing, probably due to a rookie mistake on my part :(
The problem
I have the following problem, I have created a game and attached for testing the debug APK SHA1 to Google Play Services so I could test achievements etc. I released the game and that debug SHA1 is still connected, at the time I thought it to be wise so I could keep on testing for future version releases.
Now comes the issue. I am trying to add Google Play Services to an older game I made in the past. Now I can't add the SHA1 code from that debug keystore because it already used by my other application, since I can't seem to delete that debug entry from GooglePlay Services I am stuck with using a different SHA1 code, which means a different debug key(store). However I can't seem to create a different debug store due to the rules that are needed for android SDK, I cannot change the alias, passwords for the debug key... all results in a bad keystore.
How can I change the SHA1 for the debug key which will work with eclipse and android so that I can add the new debug SHA1 to Google Play Services so I can start testing?
Have you tried to rename the file debug.keystore in the .android directory in your user home dir? Afterwards you should be able create a fresh debug keystore.
Afterwards you can try to join the two key-stores using Portecle or the keytool command-line tool.

Can you "doublesign" an android apk file?

I did search the forum for a while but i did not find an answer for this. Recently, Google has changed its Maps API for android from v1 to v2. Since i started the project way before March, i was not aware they would not accept new apps working on the old API. Hence, it's just after i finished my app that i realized the Maps API key was tied to the keystore, and i cannot get a new Map API key for v1 now. And i would have to recode the entire thing to translate it to v2, which i cannot do right now.
My question is, is it possible to doublesign the .apk file and submit it to Google Play. Let's say i have a working .apk signed with my debug keystore. However, the .apk will not be accepted by Google because it uses the debug key. Can i then "resign" it with jarsigner to force Google Play to accept it? Will the app still work if i do this? Really would appreciate help for this asap. I don't have a timeline to recode the app now, and i really want to get visibility for the app in Google Play :/
Can you “doublesign” an android apk file?
No. You can always sign the APK with any key, but that will just override old key.
And i would have to recode the entire thing to translate it to v2
Unfortunatelly there is nothing else you can do except just that if you don't have a signing key and Maps v1 API key.

Android LVL Signature Verification Failed

I am trying to implement the APK Expansion Downloader Library into my application, but I am struggling to get past the LVL verification check.
Everytime I run up the application, I get a "Signature verification failed" message back from the LicenseValidator class. The application is signed in release mode, with a proper Keystore.
I have checked maybe 10+ times that the PUBLIC_KEY I am using inside of the application is the same as on the developer account, yet its still not working. I have also uploaded the application to the Play Store, with the expansion file (correctly named), and even added in my account as a Test account on the developer console. I have also tried adding the publisher account onto my device, and its still not working.
I do not know what to do next, I need this to work and cannot find any help on the internet as to how to fix this.
Thanks
Adam
you had several versions of file extansion? Because I had the same problem as the api sent me the name of an old file ... as a workaround in the verification code I just replaces the version number ... It's not terrible, but the bug does not come from me ...
Fixed. Via "Manage apps" I stopped the Google Play Store app, cleared its data (not the cache, which was zero bytes), then restarted my licensed app - licensing now works.

Categories

Resources