简体   繁体   中英

The term alias is not recognized

While trying to get the debug certificate fingerprint to be used in firebase we got an error claiming that keytool is not recognized, but we downloaded jdk and set the path then this error appeared:

-alias : The term '-alias' 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.
At line:1 char:1
+ -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystor ...
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (-alias:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

It appears you're not typing the full command. You should be running:

keytool -list -v -keystore %USERPROFILE%\\.android\\debug.keystore -alias androiddebugkey -storepass <store_password> -keypass <key_password> (Where store_password and key_password default to android .

The output of this command will include the SHA1 and SHA256 fingerprints of your certificate which you enter in the Firebase console.

You should use this command, it will work!

keytool -list -v -alias androiddebugkey -keystore "%USERPROFILE%/.android/debug.keystore"

Password will be: android

keytool -list -v -keystore %USERPROFILE%.android\debug.keystore -alias androiddebugkey -storepass android -keypass android

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM