In android I have try to obtain a google apikey version 2 ,
I tried to obtain the sha 1 key as follows keytool -list -v -keystore "C:\Users\sapu.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android but in command prompt keytool is not recogenize as internal or external command how can I overcome this
Probably this happens because the Java home is not in your Path. Add the full path to the jdk folder to the Path variable and you'll be fine.
Where is the command keytool stored? Is it in your path? If not, then you need to give the full path.
More instructions can be found at this earlier question
Related
When obtaining my md5 fingerprint for an Android app I have encountered problems when entering the keystore command on both the cmd and jdk bin prompt:
keystore is an invalid command
In the cmd I got this error,which I researched and found that it means my keystore path is incorrect.So I double checked my path and it was correct and found a tutorial explaining to enter the same command through the jdk bin cmd prompt:
Access denied
key store address is:
C:\Users\Brian\.android\debug.keystore
The command I'm using is as follows:
keytool -list -alias androiddebugkey -keystore C:\Users\Brian\.android\debug.keystore -storepass android -keypass android
What are you trying to obtain.
Maby this answer can help
https://stackoverflow.com/a/14042038/928591
I see what your problem is, you are trying to obtain a debug key but you specify a path.
but try to just copy paste this commnad without modifying it.
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
it worked for me to obtain my debug key for a facebook app.
I could be wrong about this but I think this should work
Edit
Did some digging, the keytool comes with the java jdk. like commonsware answerd here
so do you have the JDK or the SDK installed is my next question.
Edit (another)
to answer you question in the comment take a look here.
http://docs.oracle.com/javase/tutorial/essential/environment/paths.html
finale update
this is the last update for this particular answer.
Browse to the JDK folder and execute the command from that directory.
kind regards
I am setting up a google maps activity and I am trying to get my API key. However in my cmd I get the error that keytool is not recognized as an internal or external command....ect.... I tried using the solution posted in a similar question but it didn't work for me.
My Default dubug keystore
C:\Users\Sam\.android\debug.keystore
It looks like your %PATH% - OS environment variable is not configured properly.
You can either:
Call keytool by specifying full path to your <Java_Home>/bin/keytool.exe executable file.
For me, the path looks like this:
"c:\Program Files (x86)\Java\jdk1.6.0_20\bin\keytool.exe"
Or,
Correct your %Path% variable; by appending %JAVA_HOME%\bin to it.
"c:\Program Files(x86)\Java\jdk1.7.0\bin\keytool.exe" -list -v -alias androiddebugkey -keystore "C:\Users\EIS\.android\debug.keystore" -storepass android -keypass android
Then hit the "Enter" key and your MD5 and SHA1 will show.
How to get the android:apikey for googlemap com.google.android.maps.MapView. i searched it but could not understand any of the articles. can someone please explain me how to get that key. thankyou
in command prompt set your jdk path ...
like,
C:/program files/java/jdk6/bin>
type
keytool -v -list -alias androiddebugkey -keystore "C:\Documents and
Settings\Gaurang.android\debug.keystore"
and check you debug.keystore path and hit as a below...
C:/program files/java/jdk6/bin >keytool -v -list -alias androiddebugkey
-keystore "C:\Documents and Settings\Samir\ .android\debug.keystore"
and android as a password
then copy MD5 Figerprint and add go to below link...
https://developers.google.com/android/maps-api-signup
Get-Map-Apikey
go to jdk path using command prompt :
cd java\jdk1.6.0.21\bin
then execute keytool command using this :
keytool.exe -list -keystore "c:\Documents and Settings\admin\.android\debug.keystore"
then android as password: and press enter , you ll get your api key
Basic Requirement is to have android-sdk and java. You will be needed debug.keystore.
Now the Following is a website which will give you A to Z info..
http://mobiforge.com/developing/story/using-google-maps-android.
You can usually find the Keytool.exe from the "C:\Program
Files\Java\YOUR VERSION\bin" folder
Keytool.exe will help you in Generating MD5 fingerprint.
signup link for android map api key 'https://developers.google.com/android/maps-api-signup' is not working.
showing 'Could not connect to remote server' in iframe above the fotter of the page.did any one worked on it recently?
This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
Google Maps does not display any tiles, works fine in developer device
I have gone through whole procedure of getting map api key .But when I enter my Md5 fingerprint it shows invalid .
Could somebody help me.
Is there any other way to get it work?
i think this is right a way to get key ::
To get certificate fingerprint (MD5) follow the simple steps below:
You need to get the keystore file for getting the certificate fingerprint (MD5).
Your keystore file can be found at the following path
"C:\Documents and Settings\\Local Settings\Application Data\Android"
(Or)
"C:\Documents and Settings\.android"
Keystore file name is "debug.keystore" file.
Copy the "debug.keystore" file to some other folder (ex: - "D:\Androidkeystore\") (its user friendly to use).
Open command Prompt and go to the Java installed directory. ("C:\Program Files\Java\\bin")
Then type the below line (given in box) and press enter.
keytool.exe -list -alias androiddebugkey -keystore "D:\AndroidKeystore\debug.keystore" -storepass android -keypass android
Here the MD5 certificate fingerprint is "64:88:A2:FC:AA:9F:B1:B0:CA:E4:D0:24:A8:1E:77:FB"
this is working actually........but im getting small error here
this is my path-C:\ANDROID\Java\jdk1.6.0\bin>keytool.exe -list -alias androiddebugkey -keystore"C:\ANDROID\debugkey\debug.keystore"-storepass android -keypass android
keytool error: java.lang.RuntimeException: Usage error, android is not a legal c
ommand
and finally i have solve from here ::
For more ..
as you got fingerprints copy it and past in Sign Up page. you got a key successfully
if your are using windows do this
C:\>keytool -list -alias androiddebugkey -keystore .android\debug.keystore -storepass android -keypass android
in linux
keytool -list -alias androiddebugkey -keystore /home/.android/debug.keystore -storepass android -keypass android
C:\Program Files\Java\jre6\bin ---> Here key tool is available ------
C:\Users\HB.android\debug.keystore ---> keystore path
// This may be different My UserName is HB so replace with your's
Note:without keytool u cannot get the api key and cannot execute the command
The command goes here ---->
C:\Program Files\Java\jre6\bin> keytool -list -keystore C:\Users\HB.android\debug.keystore
FF:82:84:27:33:43:C1:58:DC:4D:AC:F0:3C:A0:BF:7A
The above is ur MD5 CERTFICATE
http://code.google.com/android/maps-api-signup.html for Registration
Click the above link login and get your api key. Have fun... Happy Mapping
P.S: Dont forgot to extend MapActivity in which you are using the map layout
http://code.google.com/android/add-ons/google-apis/mapkey.html
Click the above link for help
I'm trying to generate the MD5 fingerprint from the debug.keystore file using keytool.exe in my JDK so I can use Google Maps in my Android project.
I've located the keystore file and have moved it into C:\android just to make things easier.
Then in a command prompt I type
c:\Program Files\Java\jdk1.5.0_13\bin>keytool -list -alias androiddebugkey -keystore "C:\android\debug.keystore" -storepass android -keypass android
And I keep getting the error:
keytool error: java.lang.Exception: Keystore file does not exist: C:\android\debug.keystore
I've also tried entering the keystore in from its original location rather than moving to c:\android but I still get the same error.
Does anyone have any idea why this is happening?
Also, is there any other way to get this MD5 fingerprint? Some program maybe?
to generate debug.keystore file
in Eclipse/ADT, go to Windows > Preferences > Android > Build
once it is generated use ur command(c:\Program Files\Java\jdk1.5.0_13\bin>keytool -list -alias androiddebugkey -keystore "C:\android\debug.keystore" -storepass android -keypass android) to generate MD5.
this is used to generate api key for google map.
You should execute the keytools from c:\Program Files (x86)\java\jre6\bin>
And here execute the keytool command without "\"
keytool -list -alias androiddebugkey -keystore C:\Users\<you_user_name>\.android\debug.keystore -storepass android -keypass android
It will work!
You might try adding c:\Program Files\Java\jdk1.5.0_13\bin to your PATH, then running the keytool command from the C:\android directory. That's what I do (more or less -- I have JDK6 and a different directory), and it works fine.
There are times when your .android folder is present in the C:\Documents and Settings path. Often, because of the spaces in Documents and Settings, the command will not run properly.
It's better if you just create a test folder under C: and put your debug.keystore file in this folder. Then give the path as:
keytool -list -alias androiddebugkey -keystore "C:\test\debug.keystore" -storepass android -keypass android
This works. If somebody is facing issues and getting an error on this command, you can try your luck with this.
I had the same message and when checking the C:\user.android directory could see that the debug.keystore file was not present. As this was the first time I'd tried an android project on this machine, there had been no previous builds. I created and ran the ubiquitous 'Hello World' project and debug.keystore was instantly created. I then ran keytool and the MD5 appeared fine
To generate the debug.keystore, you have to run any app at least one time. Just create and run any simple "Hello World" android app to generate it.
Create Hello World android App
Run Hello World android app
keytool error: java.lang.Exception: Keystore file does not exist: C:\android\debug.keystore
Tells me that file isn't there like you think it is.
Also, if you are using the Eclipse Android tools, you can export a signed APK file via Eclipse, which might be easier for you than using the command line tools.
First i wentto the bin directory and then
get where your debug.key is ..mainly at the .android and it worked like a charm
where androiddebugkey is the name you give
C:\Program Files\Java\jdk1.8.0_66\bin>keytool -exportcert -list -v -alias androiddebugkey -keystore C:\Users\001557\.android\debug.keystore