0

When I use the command:

PS C:\Users\Administrator\practiceone> keytool -list -v -keystore "\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android

I get this error:

keytool : The term 'keytool' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

enter image description here

I'm not able to get the certificate fingerprint(SHA) on my computer.

Any help?

Md. Yeasin Sheikh
  • 54,221
  • 7
  • 29
  • 56

1 Answers1

0

I faced this problem once, here is how to solce it:

First, run this in your cmd (command line)

flutter doctor -v

this will Show information about the installed tooling.

Second, in the Android toolchain, search for java binary:

[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at C:\Users\acer\AppData\Local\Android\Sdk
• Platform android-32, build-tools 32.0.0
• ANDROID_HOME = C:\Users\acer\AppData\Local\Android\Sdk
• ANDROID_SDK_ROOT = C:\Users\acer\AppData\Local\Android\sdk
• Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java // this one
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.

Third, copy the path of it until /bin/, in my case I will copy this:

C:\Program Files\Android\Android Studio1\jre\bin\

Forth, access that folder, run this command in the cmd (command line)

cd C:\Program Files\Android\Android Studio1\jre\bin\

Fifth, make sure that the keytool command is working:

C:\Program Files\Android\Android Studio1\jre\bin>keytool 

it should list the available commands for keytool.

Finally, run your own keytool command on that path, and it will run normally.

Gwhyyy
  • 7,554
  • 3
  • 8
  • 35
  • note, I had to use ".\keytool" not "keytool" not sure if thats a windows 11 thing or me just doing thing wrong as "Windows PowerShell does not load commands from the current location by default" – cVer Dec 26 '22 at 05:39