Default keystore file does not exist?

I'm getting this error.

C:Program FilesJavajre7bin>keytool -list -v -keystore "C:UsersSuresh.androiddebug.keystore" -alias androiddebugkey -storepass android -keypass android

keytool error: java.lang.Exception: Keystore file does not exist: C:UsersSuresh.androiddebug.keystore

java.lang.Exception: Keystore file does not exist: C:UsersSuresh.androiddebug.keystore

at sun.security.tools.KeyTool.doCommands(Unknown Source)
at sun.security.tools.KeyTool.run(Unknown Source)
at sun.security.tools.KeyTool.main(Unknown Source)

C:Program FilesJavajre7bin>

在这里输入图像描述


You must be providing the wrong path to the debug.keystore file.

Follow these steps to get the correct path and complete your command:

  • In eclipse, click the Window menu -> Preferences -> Expand Android -> Build
  • In the right panel, look for: Default debug keystore:
  • Select the entire box next to the label specified in Step 2
  • And finally, use the path you just copied from Step 3 to construct your command:

    For example, in my case, it would be:

    C:Program FilesJavajre7bin>keytool -list -v -keystore "C:UsersSiddharth Lele.androiddebug.keystore" -alias androiddebugkey -storepass android -keypass android

    UPDATED:

    If you had already followed the steps mentioned above, the only other solution is to delete the debug.keystore and let Eclipse recreate it for you.

    Step 1: Go to the path where your keystore is stored. In your case, C:UsersSuresh.androiddebug.keystore

    Step 2: Close and restart Eclipse.

    Step 3 (Optional): You may need to clean your project before the debug.keystore is created again.

    Source: http://www.coderanch.com/t/440920/Security/KeyTool-genkeypair-exception-Keystore-file

    You can refer to this for the part about deleting your debug.keystore file: "Debug certificate expired" error in Eclipse Android plugins


    将此用于MAC用户

    keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
    

    For Mac Users: The debug.keystore file exists in ~/.android directory. Sometimes, due to the relative path, the above mentioned error keeps on popping up.

    链接地址: http://www.djcxy.com/p/91334.html

    上一篇: Android Google Maps无法在当前主题中查找样式“mapViewStyle”

    下一篇: 默认密钥库文件不存在?