android google map view - android

i am using android Google map, the map is displayed in emulator but not in the device.. can any one help me to solve the problem.

This is the problem of Wrong map key.
You have to find your debug.keystore file path and then you have to generate google map key.
In windows:
The debug.keystore is mostly found at :
C:\Users\UserName\.android\debug.keystore
Same is in ubuntu, means in home\user\username\.android\debug.keystore
For conveniency:
You can download the "Keytool plugin" in android to get the md5 fingerprint.
After getting md5 fingerprint, You can obtain the map key from here:
https://developers.google.com/android/maps-api-signup

I had the same problem before, the question is that when we compile the app and get the release apk, google actually thinks that the app is released, so we have to get a release key to use it on real devices, but for a while to keep testing and developing the app, we should use the debug apk. To use the debug apk just go to:
YourApplicationFolder\app\build\outputs\apk\app-debug.apk
After compile or running on emulator.

Make it as a signed application and uninstall the previous application, then install it again. This will work as I faced the same problem.

I think you have used the debug key(for generating the unique key).
Try to use release key instead.
Use the following command:
keytool -list -keystore fileName.keystore
on command prompt to generate the release key.
For more details see http://code.google.com/android/add-ons/google-apis/mapkey.html.
Hope this will work for you.

Related

I can't upload the app to google play

I bought an application but when I upload it to the google play this message appears
I have searched a lot and nothing has worked out. I would like some help
You have to make build with keystore used to make build which is currently live on developer console.
WHen you say you bought an application, do you mean you bought an application already on the play store? If so, they should have given you the signing key and passwords. Use that to sign your app. If they didn't, you need to get it from them. If they don't have it, you need to contact google. Good luck with that, as you'll need to prove somehow you're the new owner. You really better hope they gave you or have the key.
Problem : maybe you not chose the signatures v1 v2
https://i.stack.imgur.com/yhIqB.jpg
As already mentioned, the key you generated the apk with is not to the one it should have, so you made some mistake at generating the signed apk in Android Studio by missing your key file. So you maybe just created a new one instead of using the old one
You have not signed the application with a different .keystore file.
If you are using xamarin the keystore file path;
C:\Users\your user name\AppData\Local\Xamarin\Mono for Android\Keystore
if you are using android studio, you must find your previous keystore.jks file. This file must have same md5 your error said.
You can see your keystore files md5 and sha1 codes with this command;
keytool.exe -list -v -keystore "%LocalAppData%\Xamarin\Mono for Android\debug.keystore" -alias youralias-storepass yourkey-keypass yourkey

google map not show in release apk using android studio

I am developing an app, here I'm using google map in debug mode map shows correctly but in release mode map not showing and shows only current location.
By using google map API I have tried but still its not working and also I find the SHA1 by using keystore(i.e. keytool -list -v -keystore file path.jks) then also its not working.
By using following views I tried and found the SHA1 key but map not shown in app.
Release APK file not showing google maps
How do i do?
Have you set your google_maps_key in both debug & release folder in google_maps_api.xml.
If not please, set it. You can find both folders inside Project structure.
See image for reference.
Generate API key access using release key-store. And set Google API console.
Go to google API console.
crate new project
generage API key
enable your service
add API key in your project
OR
You can simply follow this developer guide LINK.
If you have troubling in getting SHA-1 key. You can easily get it by running Signing-report gradle task as below picture (in Android studio).
I solved it by looking at Google Play Console in the left menu select configuration, then integrity of the app and then copy the sha1 of the upload key certificate that is below of the SHA1 Certificate of the app signing key and add it in the same API key of Google Cloud Platform. This way I didn't have to make changes to the apk.
If it doesn't work for you, add both and try.

Google maps only a grey background as APK

I develop locally with android-studio and a Galaxy S3 android phone connected via USB.
On my local development environment, when I fire up the run configuration to deploy on the S3, everything works fine - the map shows up just fine.
But when I deploy as signed APK to our server, and install via Internet (I am trying on another android phone to keep things clearly separated), the map tiles don't load, I see the Google sign to the lower left and the GPS location icon on the upper right corner.
I've seen a few related posts:
Android Google Maps application showing grey background instead of the map
which seems first a bit dated, second he uses eclipse (I am using android-studio), third - it didn't work for me.
Android - Google Maps Grey Screen on Signed APK
This guy didn't get any useful answers to his question....
The first step is to get the SHA1 value for the key that you used to sign the release version of your app using the keytool command line tool.
keytool -list -v -keystore ~/Keystore/key1.jks -storepass <your_store_password> -keypass <your_key_password>
Replace ~/Keystore/key1.jks with the path and name of the keystore that you used to sign your release version, and replace the passwords with your own.
When you execute this command at the command line, it will list the Certificate Fingerprints, including the SHA1 value that you need.
The next step is to add the SHA1 and package name to a key in the Google Developers Console.
You can either add it to the same key you used for debug builds, or you can create a new key.
To add your release SHA1 and package name to an existing API key, click the Add package name and fingerprint button, and add your SHA1 value and package name.
Then, you can use this API key with the signed release version of your app.
For more information on how to configure your app if you use a different API key for debug and release, see here.
Step 1: Follow the instructions from here:
http://developer.xamarin.com/guides/android/platform_features/maps_and_location/maps/obtaining_a_google_maps_api_key/
Step 2: Then from your Android Studio, follow the steps described here:
https://www.udacity.com/wiki/ud853/course_resources/creating-a-signed-apk
I faced a similar problem and had it solved by doing the above.

Android SHA1 release keystore not working with Google Maps

I am using the Google Maps Android API and I'm running into some issues.
I am signing my apk with android studio (created one at .android/keystore.jks). Also I'm selecting "release" as type in it. I have used the command
keytool -list -v -keystore C:\Users\Toshiba\.android\keystore.jks
to get the SHA1 fingerprint out of the keystore.
The SHA1 is correct, but the Map is not shown on a signed APK. It is shown in a debug APK.
Using keytool with the release keystore (keystore.jks) will get me this:
SHA1: 33:46:07:82:5B:D4:45:D2:60:CE:5A:29:97:9F:6C:44:XX:XX:XX:XX
The debug one works fine (I have added 2 to the API console in Google)
33:46:07:82:5B:D4:45:D2:60:CE:5A:29:97:9F:6C:44:XX:XX:XX:XX;yac.breakingpoint
7C:28:61:5B:C3:4A:5C:50:44:AA:FD:58:69:E9:70:91:XX:XX:XX:XX;yac.breakingpoint
XX is blacked out.
The keytool says it is using SHA256withRSA as signature algorithm for both, the debug and the release keystore.
What am I doing wrong?
UPDATE
So I've tried a new API key, clean project and rebuild it, new keystore - still not working on release... debug is fine!
UPDATE 2
Still not found a working solution... Help me!
UPDATE 3 Allright, got it working using a signed APK with build type debug. Extracted the CERT.RSA and runned keytool -printcert -file ./CERT.SA. Got the same result as for the release build type. In release it is not working!
UPDATE 4
Here's another try I made:
Created a new GIT Repository, commited to it.
The /buildfolders are not beeing commited since they are in the .gitignore files.
Created a new API key in the API console and added only the release SHA1 key to it.
Added that API key to the app and made a full clean with rebuild.
Generated a new signed APK file
It did not work.
UPDATE 5
A friend of mine tried to reproduce this issue. He has the exact same issue when working with android studio. Probably a android studio bug?
You have two google_maps_api.xml files
One in this folder:
app/src/debug/res/values
Other in this folder:
app/src/release/res/values
But only the debug one contains your API key probably.
1) Usually, you have to Clean and Rebuild the Project so it can work.
2) Make sure your build variant is on Release (Android Studio is friendly on this)
3) Also if you are debugging on your devices fully uninstall first then continue.
4) As the documentation says, make sure you have set up your manifest correctly.
Hope it helps.
Create new project in Android Studio with Google map Activity. After project automatically creates the SHA1 in the manifest. Use this SHA1 to get MAP api key. Test your app be sure it works. And after build you app on what project.
the SHA1 currently you are using for debugging purpose .
So when you are creating a signed apk u have one kestore file. try to generate new SHA1 key with this new keaystore file.
then using this keystore file create API key for signed apk from google console.
replace debug API key already stored in manifest file with the new one.
It will work
thanks
You also need to add SHA-1 generated by Google App signing certificate.
Once you publish your app you can find it in Google Play Console -> Development Tools -> Release management -> App signing -> App signing certificate.
More details on this in this here: Google Places for Android API key does not work on app from Play Store

android map v2 won't show in debug mode

do i have to publish the apk everytime in order for the map to show? My map won't display while running via eclipse, i have to export to apk and then install on my deivce to test. Is there a easier way to test a map v2 apk? Thank you!
First thing you have to Use your debug.keystore file from .android folder and then generate SHA1 using that keystore.... in Command Propmt.
And then you have to generate your Google Map v2 API key using this SHA-1 from Google API Console.
And use this key in your application and you don't need to Export your Signed application..
Thanks..!!
You can't display maps in the Emulator since it doesn't have Maps installed in it. You must run all the Maps related applications in your android device.
Also, Just connect your device to the PC/laptop and eclipse will automatically prompt in which device you want to run and then you can select your device.
Its because there is no maps in your emulator. Your map will display only on a pure AVD, i.e. it CPU of emulator must be ARM, and the target should be a Google APIs device. For Maps V2, you need google play services installed in your emulator/device. By default its not available in any emulators.
You can force install google play services into an emulator, follow this for a start.
The better option is to use a device(mobile/tab) via USB with developer options enabled (USB Debugging checked).
Try it...
Use this command to generate SHA1 certificate with your debug.keystore, than generate API key with generated SHA1 certificate
How can I get the MD5 fingerprint from Java's keytool, not only SHA-1?
After generating key from API console use that key to your Manifest file.
There is, but you need to modify your debug key in eclipse (I'm assuming you are using eclipse).
First off, The google mapview stuff only shows when the Api key you are using is derived from the signing key. Here lies the problem - eclipse uses its own default key when you're launching from the IDE.
So you need to use your actual signing key for the debug. If you go to Window -> Preferences -> Android -> Build, you will see that eclipse is using a default debug keystore.
You have there the option to use a custom debug keystore. BUT NO WAY TO SET CUSTOM PASSWORD.
Good thing you can change the password on your original signing key (I prefer to create a copy and tag that as my "debug" key) and still retain all/most of its properties, I honestly don't know which ones, such that you can now use it as a debug keystore and still have it display the google maps layout.
To change keystore password just fire up cmd and do:
keytool -storepasswd -keystore my.keystore
Eclipse uses "android" as the default password for debugging, that's what you enter as new password.
After modifying your key, you can now set it as the custom debug keystore and start going Ctrl+F11 on your android source.
As far as I know, you can even override installation of the normally-signed app on your phone with this technique, so it goes further than just having google maps enabled while debugging.
C:\Program Files\Java\jdk1.7.0_03\bin> keytool.exe -V -list -alias androiddebugk
ey -keystore "C:\Users\Dell.android\debug.keystore" -storepass android -keypass android
type this in CMD.this will give both sha-1 and md5 key..plz change path as per ur machine..!
Make sure that the release API key is in the google_maps_api.xml file under the release/res/values folder, since this is the one that will be used for the signed release apk.

Categories

Resources