how to get "Sha1" for a flutter application. I am using flutter in Vs code.In android studio we have direct option for that, but i don't know how to get it in Vs code.
It's very simple follow below steps.
Step 1. Go to your project directory in VS code.
Step 2. Open terminal.
Step 3. Run cd android for the below path :
Ex.: PS D:\Workspace\FlutterWorkSpace\FlutterApp\flutter_demo_app> cd android
Step 4. Run .\gradlew signingReport for the below path :
PS D:\Workspace\FlutterWorkSpace\FlutterApp\flutter_demo_app\android> .\gradlew signingReport
Then it will display like that
> Task :app:signingReport
Variant: debug
Config: debug
Store: C:\Users\User\.android\debug.keystore
Alias: AndroidDebugKey
MD5: 6C:64:D6:49:31:37:60:3F:1D:2E:31:2A:F4:3C:E3:D6
SHA1: 54:B0:BC:D6:D6:B4:C3:51:88:E9:20:62:56:CD:23:2D:A7:C0:0F:FD
SHA-256: 80:BF:B3:A8:0D:D6:D9:7C:C8:5F:61:32:22:6B:EA:D1:51:03:8D:1H:5E:0F:F7:0B:G3:56:1DD1:D1:3B:DB:FA
Valid until: Monday, 30 March, 2048
open terminal - navigate to root project folder -
cd android && ./gradlew app:signingReport
PS: I tried the above code for my signed project
Open a terminal window.
Change the directory to the JDK bin directory, mine was jdk1.7.0_05 (could be different for you).
cd
C:\Program Files\Java\jdk1.7.0_05\bin
Next we have to run the keytool.exe. Use the following line to get the Android SHA1 fingerprint.
Windows:
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore"-alias androiddebugkey -storepass android -keypass android
Mac and Linux:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Following these steps, that was the only steps that worked for me
Go to your VS project
Open the terminal
cd android
./gradlew signingReport
That's all ;) your welcome!
In windows
Open a terminal window
Run the following command by changing USERNAME
keytool -list -v -keystore "C:\Users\USERNAME\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
Simply get the SHA1
1 : open cmd in windows.
2: use cd C:\Program Files\Java\jdk1.7.0_05\bin this will lead you to bin folder of jdk.
3:get path of file debug.keystore that in my case is C:\Users\name\.android\debug.keystore
4: then run this command keytool -list -v -keystore
C:\Users\name\.android\debug.keystore -alias androiddebugkey -storepass android -
keypass android
this will give you the SHA1
in you project root
cd android
./gradlew signingReport
open your terminal make sure you have selected the root folder of your project in that terminal
enter this command:- cd android
E:\nitish\FLUTTER LEARNING\UI Design\login_app\android>
3.enter this command :- .\gradlew signingReport
and wait for some time...
Related
I'm trying to generate a SHA-1 for a Flutter app, for Android studio to support Google Sign in, but I don't know how to do that, I saw some posts that indicate to run a command, but there I need a jks file I guess, and flutter doesn't create that.
Could someone help me?
TERMINAL
Go to the project folder in the terminal.
Mac
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Windows
keytool -list -v -keystore "\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
Linux
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
GUI Android Studio.
Select android/app/build.gradle file and on the right top corner click "Open for Editing in Android Studio"
Open Gradle panel and double click on "SigninReport",
see Android studio Gradle Tab
That's it! If you use Firebase - add these 2 keys there. You should add both keys, otherwise, without the release key, Google login will not work on the devices.
This is the easiest way-
Open Android Studio
Open Project
Reveal android folder
Right click "gradlew" file and select Open in Terminal -
Go to the terminal view and paste: gradlew signingReport
(edit based on Venkat D. suggestion below: on unix-based systems like mac, you need to specify the current directory like this- ./gradlew signingReport)
Press enter and scroll to "Variant: debug" to get the SHA1 key
Copy and use wherever you need it, Good Luck!
You won't find a gradle window view in flutter project, so here is a solution for that.. In command prompt navigate to bin folder of jdk and run this command
keytool -list -v -keystore "C:\Users\yourusernamehere\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
change user name in path
I partially agree with Rishab answer, but what we can do is
and this approach works with all flutter/React-native/Android ....
Navigate to Android folder inside project, there is gradlew file. so we can use this like :
gradlew signingReport
in Mac
./gradlew signingReport
in my case i use it like :
D:\flutter\flutter_app\android>gradlew signingReport
Project Architecture is :
so if you are using an android studio or VS code it's work both of them
=> Open Terminal
=> cd android
=> signingReport
and the final output like this as given in the image below choice your SSH key in at the place of here is your SSH key
in the above output, image is shown in dummy data I change some of the fields just because of security purpose
Edit: for mac
./gradlew signingReport
run this commend
it work any where
in android folder
./gradlew signingReport
for example
PS E:\flutterProject\flutter_app\android> ./gradlew signingReport
some time you not need add ./ just
gradlew signingReport
this work for android studio and cmd and commond prome
you can do the same on VSCode, open the folder that contain gradlew for linux and gradlew.bat for windows and run ./gradlew signingReport for Window and run gradlew signingReport for Linux
1-write those two commands in android studio's or vscode terminal:
cd android
gradlew signingReport
2-wait a bit then scroll up.
in linuix
cd android
./gradlew signingReport
Simple and easy:
cd android && gradlew signinReport
For Android Studio 4.2 and Flutter 2.2
Windows:
Open your project open android > gradlew > right click on it and click open in terminal
Like below:
My Project Directory: D:\AndroidStudioProjects\WowTalentNew\android>gradlew
open this in terminal.
After build finished execute this
D:\AndroidStudioProjects\YourProjectDirectory\android>gradlew signinReport
After that you will see the SHA keys
Here's my full CMD screen
Microsoft Windows [Version 10.0.19043.985]
(c) Microsoft Corporation. All rights reserved.
D:\AndroidStudioProjects\WowTalentNew\android>gradlew
> Configure project :app
WARNING: The option setting 'android.enableR8=true' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
> Task :help
Welcome to Gradle 6.3.
To run a build, run gradlew <task> ...
To see a list of available tasks, run gradlew tasks
To see a list of command-line options, run gradlew --help
To see more detail about a task, run gradlew help --task <task>
For troubleshooting, visit https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle
7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See
BUILD SUCCESSFUL in 6s
1 actionable task: 1 executed
D:\AndroidStudioProjects\WowTalentNew\android>gradlew signinReport
> Configure project :app
WARNING: The option setting 'android.enableR8=true' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
> Task :app:signingReport
Variant: debugAndroidTest
Config: debug
Store: C:\Users\apoor\.android\debug.keystore
Alias: AndroidDebugKey
MD5: 2A:97:87:DF:E1:58:D4:9D:E6:65:18:********
SHA1: 4E:0E:D0:F7:68:51:80:47:3E:D1:**************************
SHA-256:
17:83:42:F4:0E:59:C5:5B:1E********************************************************
BC:79
Valid until: Saturday, November 26, 2050
in Linux instead of just type gradlew we write ./gradlew to build. and to get SHA-1 we write: Terminal> ./gradlew signinReport and we could just build and get SHA-1 key with just one command: Terminal> ./gradlew signinReport
I hope it clears everything, happy coding!
To generate SHA-1 for a Flutter :
1. Locate your android directory inside the console
E:\<appname>\android>
2. After locating to the android folder run this command
./gradlew signingReport
If this won't work and opens a daemon terminal
1. Type signingReport in daemon terminal
daemon> signingReport
This would be taking a bit long time to generate your first SHA-1 as it
would be checking for all the firebase dependencies and after that
over it generate the SHA-1.
Check this Authenticating Your Client | Google APIs for Android
To get the debug certificate fingerprint:
for Mac or Linux
keytool -list -v \ -alias androiddebugkey -keystore ~/.android/debug.keystore
for Windows
keytool -list -v \ -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
The default password for the debug keystore is android.
The keytool then prints the fingerprint to the terminal.
1. First Methord
just run the below command
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
2. Second Methord
1. Left side
open the android folder not the whole project in android studio.
2. Right Side open the file android/app/Tasks/anroid/signingReport
Final this process will take some time and it might be of 5-10 minutes so be patient
This solution work for me in MAC os Monterey and Android studio Bumblebee
open the android folder in terminal
right click on Android folder>Open In>Terminal
it will open new terminal window
and run below command
bash ./gradlew signingreport
You can generate it even from terminal. Following is for the release mode:
keytool -list -v -keystore keystore_location -alias alias_name
example :
keytool -list -v -keystore /home/user/key.jks -alias alias_name
Method 1
Make sure java is installed in your system.
Method 2
Using Command-line change your username and run the below command
keytool -list -v -alias androiddebugkey -keystore C:\Users\YOURUSERNAME\.android\debug.keystore
the default password is android
go to the android folder in terminal
cd android
.\gradlew signingReport
it will generate your SHA1 and SHA256 for you
First, check which Keystore is being used by your project in
Then use the below command
keytool -list -v -alias mstoreappsemoAlias -keystore fluxstorepro/android/app/mstoresemoFile.keystore
and if you want to generate a hash key for Facebook then use the below command
keytool -exportcert -alias mstoreappsemoAlias -keystore fluxstorepro/android/app/mstoresemoFile.keystore | openssl sha1 -binary | openssl base64
To get generate a SHA-1 key
in the terminal type cd android and change the path then type ./gradlew signingReport
If you have the keystore file, then run keytool -list -v -keystore fileName.jks -alias upload -storepass password -keypass password at the keystore file location...
Flutter Project Using MAC & VS Code
Step One
Go To the Android Gradle Properties and add this line
https://services.gradle.org/distributions/gradle-6.3-all.zip
Step Two
Open the Terminal at android Folder of your Projects .
then in the terminal type
.\gradlew signinReport
you will get the signing report Like this :
try writing this in Terminal - For Windows
cd android
gradlew signingReport
For Mac Users
If after typing ./gralew signingReport inside android folder gives you this error:
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
Then follow this process:
Run flutter doctor -v
Now inside the Android toolchain copy the location after Java binary at:. It will be something like this:
/Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
Paste it in the project's root location and Replace the java at the end of the above location with keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android.
You are done, you will see the keys now.
for linux:
if you are using vscode you can right-click on gradlew->copypath (in my case: /home/alif/Documents/project/flutter/fit_app/android/gradlew)
open your terminal and paste it, don't forget to delete /gradlew
type .../android gradlew signinReport and hit enter
good luck!
I found that I needed to check the fingerprint in Google Play Console, since I have Google Play managed app signing.
The ones provided by gradlew did not work for me.
Note that you can put both in Firebase, but you only need one. I just added the SHA1 and Google Sign In began working.
Personally, I went to the terminal then navigated to C:\Program Files\Java\jdk-14.0.2\bin (navigate to your java bin folder).
Next, I ran this command and it worked: keytool -list -v -keystore "%USERPROFILE%.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
gradlew signingReport
Use this command on Terminal which you can find in bottom left corner.
You can use one line in terminal
echo y | keytool -genkeypair -dname "cn=Chris, ou=JavaSoft, o=Sun, c=US" -alias business -keypass kpi135 -keystore /working/android.keystore -storepass ab987c -validity 20000
dname is a unique identifier for the application in the .keystore
cn the full name of the person or organization that generates the
.keystore
ou Organizational Unit that creates the project, its a subdivision of
the Organization that creates it. Ex. android.google.com
o Organization owner of the whole project. Its a higher scope than
ou. Ex.: google.com
c The country short code. Ex: For United States is "US"
alias Identifier of the app as an single entity inside the .keystore
(it can have many)
keypass Password for protecting that specific alias.
keystore Path where the .keystore file shall be created (the standard
extension is actually .ks)
storepass Password for protecting the whole .keystore content.
validity Amout of days the app will be valid with this .keystore
Solution for Windows Flutter 2022-23 solution to get SHA-1
First solution:-
In your project terminal type cd android
now you're inside the android folder now type ./gradlew then type
gradlew signinReport
IF you got this error then try next solution
second solution
Again type cd android in your root project
Now type ./gradlew signingReport
you will surely get SHA-1
If you are using flutter I hope it will work for you,
If you are using vs code then open terminal or if you are using other stuff then Goto the project folder and open terminal and past below code
keytool -list -v -keystore "C:\Users%your user name%.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
It's work for me. i think will work for you also.
So... I need to get a SHA1 key. I'm not a Java fan, so I'm creating my app in Cordova but I need the SHA1 to register it in Google's Developer Console. Does someone know where it is? I tried importing the project in Android studio but still couldn't find anything...
For Windows you have to create it using command prompt.First go to your java bin directory via the cmd like C:\Program Files\Java\jdk1.7.0_71\bin,then type
keytool -list -v -keystore c:\users\your_user_name\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android
For Mac users go to terminal ,then type
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
I'm trying to get the SHA1 fingerprint so I can get an Google API key.
Im in the following directory:
/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/bin
Then I execute the command from the google site :
keytool -list -v -keystore mystore.keystore
But it gives this error:
keytool error: java.lang.Exception: Keystore file does not exist: mystore.keystore
java.lang.Exception: Keystore file does not exist: mystore.keystore
at sun.security.tools.keytool.Main.doCommands(Main.java:742)
at sun.security.tools.keytool.Main.run(Main.java:340)
at sun.security.tools.keytool.Main.main(Main.java:333)
I followed tutorials but I can't get it to work!
Does anyone know what I am doing wrong?
BTW: I'm using a Macbook Pro with Xamarin Studio 5.5.2.
Linux & Mac command
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Will give you SHA1, SHA256, MD5 for default debug key. And it can be used for developing and debugging with google play services.
For publication certificate just follow https://developer.android.com/studio/publish/app-signing.html
You said you are running the command from...
/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/bin
Is your keystore file in that directory as well? If not then you need to specify the path to the keystore file, e.g.
keytool -list -v -keystore ~/somefolder/mystore.keystore
The keystore used should be the one used to sign the app. For Xamarin debug builds this will be the debug keystore located at /Users/[USERNAME]/.local/share/Xamarin/Mono\ for\ Android/debug.keystore. The command on OSX for this would be...
keytool -list -v -keystore /Users/[USERNAME]/.local/share/Xamarin/Mono\ for\ Android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Or on Windows 7
keytool -list -v -keystore C:\Users\[USERNAME]\AppData\Local\Xamarin\Mono for Android\debug.keystore -alias androiddebugkey -storepass android -keypass android
I faced the same issue, but resolved via following command:
keytool -exportcert -keystore C:\Users\<USERNAME>\.android\debug.keystore -list -v
OS: Windows 7
I have windows 10, I went to the route
c:/Users/usuario/.android/
Inside directory, execute command:
keytool -exportcert -keystore debug.keystore -list -v
Must generate fingerprint:
SHA-1: 73:BE:1A:.......................
MDO: 73:BE:A1.........................
SHA-256: 3B:B8:98:...................
Please provide the complete path of debug.keystore.
Example: C:/Users/myusername/.android/debug.keystore instead of ~/.android/debug.keystore
In my case the debug.keystore is generated after the first run of the app on Android Studio
I had the same issue.
My error was
keytool error: java.lang.Exception: Keystore file does not exist:/Users/[USER_NAME]/.android/debug.keystore java.lang.Exception: Keystore
file does not exist: /Users/[USER_NAME]/.android/debug.keystore
at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:910)
at java.base/sun.security.tools.keytool.Main.run(Main.java:416)
at java.base/sun.security.tools.keytool.Main.main(Main.java:409)
I checked my /Users/[USER_NAME]/.android/ directory and I couldn't find debug.keystore file there.
Reason:
I used VSCODE and I did run my application only for iOS through iOS Simulator.
Solution:
I opened Android Studio and run my application for android with Android Emulator.
Then I got debug.keystore file in my .android/ directory.
Then I tried command below again:
keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
And it runs without any error.
I hope it helps you.
I had the same error in Windows 10 as well. But sorted it and finally got SHA-1 Key.
I followed these steps
1.Open C drive and follow this path C:\Program Files\Java\jdk1.8.0_201\bin .
2.Inside bin folder open CMD and run command keytool -exportcert -list -v -alias androiddebugkey -keystore C:/Users/Username/.android/debug.keystore . (Replace Username with your username).
3.Enter password as android .
Linux or Mac or Windows, use complete path
Mac:
keytool -list -v -keystore /Users/username/.android/debug.keystore
-alias androiddebugkey -storepass android -keypass android
Linux (Ubuntu in my case):
keytool -list -v -keystore /home/username/.android/debug.keystore
-alias androiddebugkey -storepass android -keypass android
Windows:
keytool -list -v -keystore C:\Users\username\.android\debug.keystore
-alias androiddebugkey -storepass android -keypass android
Hope it work for you!
I found this guide from teamtreehouse forum. hope it'll help you.
1) Open Command Prompt by pressing Start+R and typing cmd.exe.
2) Using Windows Explorer, find where your JDK directory is located (Usually Program Files >> Java) and copy the path.
3) In Command Prompt, type cd followed by the directory of your JDK’s bin directory. e.g: cd C:\Program Files\Java\jdk1.8.0_25\bin is the command I use (Yours may vary).
4) Using Windows Explorer, find where your .android directory is located (Usually under Users >> [YOUR WINDOWS USERNAME]) and copy the path.
5) Now, use this command below:
keytool -exportcert -alias androiddebugkey -keystore[PATH_TO_.ANDROID_DIRECTORY] -list -v
Replacing [PATH_TO_.ANDROID_DIRECTORY] with the path you copied. Note that you should be running this command in terminal/command prompt in your JDK’s bin directory (You did this in Step 3).
Mine is C:\Program Files\Java\jdk1.8.0_121\bin>keytool -exportcert -alias androiddebugkey -keystore C:\Users\HoSiLuan\.android\debug.keystore -list -v
Remember to use C:\Users\HoSiLuan\.android\debug.keystore instead of ~/.android\debug.keystore. I still got the error when type this shorten way.
You should then be prompted with the password as normal which you can enter (The password is android) . After that, you’ll see the list of certificates printed to the screen.
If you are on Windows open command prompt and RUN AS ADMINISTRATOR then paste the line keytool -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore. That should work, it worked for me
I lived same problem on Windows 10 and solved that problem with writing below command:
keytool -list -keystore debug.keystore
I think with some other commands java couldn't find debug.keystore file but interestingly with that command it works for me.
I had the same Error
am using ubuntu 18.04
Solution:
Open terminal and navigate to /home/{$user}/.android
Then run the command
keytool -list -v \ -alias androiddebugkey -keystore ~/.android/debug.keystore
You will be prompted to enter a keystore password enter android
Hope this helps.
Below command should work:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
So I have found the solution.
On Windows, open cmd from start menu and write cd C:\Users\put_here_your_username\.android and then write
keytool -list -v -keystore ".\debug.keystore" -alias androiddebugkey -storepass android -keypass android
last update for Mac & Ubuntu
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v
I faced the same problem, I found that I had .android folder inside another .android folder. Make sure to find the right path of debug.keystore file on your system
I used this command and it worked
keytool -list -v -alias androiddebugkey -keystore C:\Users\User.android.android\debug.keystore
keytool -list -v -keystore C:\Users\%USERNAME%\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android
Try this to get resolve from the problem
If you are on Windows open command prompt and then Run it as an administration then paste this: keytool -list -v -alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore
use password : android
then you will get SHA-1 and SHA-256 this worked smoothly for me.
Install keytool on your system
Keytool is included as part of the Java runtime. So by installing Java, you'll also have keytool in your system.
To install Java, visit the JAVA SE Downloads page. Then, select the JDK Download link.
After that, add the keytool folder to your system %PATH% (on Windows). In order to run keytool from the command line, you need to add it to your system PATH. This step is required on Windows only.
Finally, run this command in a terminal, and don't forget to change the user name to your own:
keytool -list -v -keystore "c:\users\your_user_name\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
Open CMD and navigate to Java bin folder for example:
C:\Program Files\Java\jre1.8.0_341\bin
Once you stand here then paste this:
keytool -exportcert -list -v -alias androiddebugkey -keystore C:/Users/*YOUR_PC_USERNAME*/.android/debug.keystore
Do not forget to change to your own PC username marked with * YOUR_PC_USERNAME *
Double check that you are putting the correct address in my case I had two typos and that fixed it.
I had c:User instead of C:\Users\
Find your debug.keystore file by searching (usually it is in .android) and then use this
keytool -list -v -alias androiddebugkey -keystore "C:\Users\u_name\ .android\debug.keystore"
Use your own full path name not copy paste from anywhere.
It solved mine and this or some else solution will solve yours too😄.
just put this given command in your package.json file and hit run yarn sha-keys
"sha-keys": "keytool -list -v -keystore ./android/App/debug.keystore -alias androiddebugkey -storepass android -keypass android",
I tried to figure out how i can see the SHA-1 fingerprint, according to the Google guide https://developers.google.com/maps/documentation/android/start, I should do the following
For Windows Vista and Windows 7, run:
keytool -list -v -keystore "C:\Users\your_user_name.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android "
But I cannot understand where i should run this trial in windows?
You need to run it directly in the bin sub-directory of your Java JDK directory (e.g. for me it is C:\Java\jdk1.6.0_37\bin) or add the bin directory to your PATH environment variable. If you do the latter, you can run the command from any command line prompt.
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