开发者

How to set the password for keytool in windows?

I am adding google-maps-api for the my hellomapview progam for android appilication developement refering the website [http://developer.android.com/guide/tutorials/views/hello-mapview.html][1].Before generating the api key it ask for md5-signature certificate.So when try to create md5 certificate using keytool via commandline in windows i got the following error.Please guide to this clear this error or how to set password and what is the default password fo开发者_StackOverflowr keytool.

Error:

C:\Documents and Settings\USER>keytool -list -keystore .android\debug.keystore Enter keystore password: keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect

Output with image: http://bit.ly/gOrcfG


you are not giving pass. for it. so try below:


$ keytool -list -alias androiddebugkey \
-keystore <path_to_debug_keystore>.keystore \
-storepass android -keypass android


You can use this windows batch command but I prefer to use an ant script: cleaner and simpler.

Here is the ant commands to use to generate a key:

    <genkey alias="${Alias}" storepass="${Password}" keystore="${KeyStore}" validity="${ValidityDays}">
      <dname>
        <param name="CN" value="Antoine PINEAU" />
        <param name="OU" value="AP2cu" />
        <param name="O" value="ap2cu.com" />
        <param name="C" value="FR" />
      </dname>
    </genkey>

Here are the ant commands to use to signa jar with the generated key:

    <signjar jar="${JarFile}" alias="${Alias}" storepass="${Password}" keystore="${KeyStore}" />

I hope it will help you.


Try not pass any password. I had the same problem, but I got the error when I give a passwork. (After all, I never configured a password for keystore before).

When I just press enter with no password, my fingerprint was created.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜