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.
Related
I tried to get my SHA-1 key by using the terminal but I don't know what problem is there, can anyone help me with this? I know how to get sha-1 key in android studio by signing report, but I want to generate in terminal.
Here is what I got when I run the command, I tried this answer but got nothing: how to get sha1 of android app in Vs code
above is my cmd. It is saying that it is an illegal option.
I have my Java bin directory here C:\Program Files\Java\jdk-14.0.2\bin and debug.keystore here: C:\Users\91819\.android
Put a space between "C:\Users\91819\.android\debug.keystore" and -alias
open the Project folder in VS code
Open the Terminal
Enter the following cmd and enter
keytool -list -v -keystore "C:\Users\yourusernamehere\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
Replace yourusernamehere to your windows user name
you will get the SHA1 and other details.
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
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
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?
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