我找不到 debug.keystore 文件
我在使用 Eclipse 和 Android 的 SDK 时遇到错误。显然,这是因为我的证书已过期。所以我用谷歌搜索了错误,发现我必须删除 ~/.android/debug.keystore 文件。问题是我找不到这个文件。它不在我的 SDK 中。
有人可以帮我吗?
编辑:我在 Mac 上工作。
I'm having an error with Eclipse and Android's SDK. apparently, it comes from the fact that my certificate expired. So I googled the error and I found that I have to remove the ~/.android/debug.keystore file. The thing is I can't find this file. It's not in my SDK.
Can someone help me with this ?
Edit: I work on Mac.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
打开 Eclipse Preferences,然后导航至 Android > 构建。在那里您将看到一个字段,该字段指示调试密钥库的位置。
Open Eclipse Preferences, then navigate to Android > Build. There you'll see a field that tells the location of your debug keystore.
在 Linux / OSX 上,使用您最喜欢的终端并输入 rm ~/.android/debug.keystore 来删除调试密钥库。
之后,您可以通过按照以下步骤创建一个新的密钥库。
On Linux / OSX use your favorite terminal and type
rm ~/.android/debug.keystore
to remove the debug keystore.You can create a new keystore after that by following these steps.
我相信它位于 OSX 中的
.android/avd/
目录中,但也可能按照您的建议位于/.android/
中。请记住,
~
表示您的主目录,因此您无需在 SDK 中查找它!(免责声明)自从我已经战斗了一段时间了有了这个,我没有在Mac上做。
I believe it is in the
.android/avd/
directory in OSX, but it could also be just in/.android/
as you suggest.Remember that
~
means your home directory, so you do not need to look for it in your SDK!(disclaimer) It's been a while since I've battled with this, and I didn't do it on a mac.
调试证书的过期
用于在调试模式下对应用程序进行签名的自签名证书(Eclipse/ADT 和 Ant 构建上的默认设置)的过期日期为自创建之日起 365 天。
当证书过期时,您将收到构建错误。在 Ant 构建上,错误如下所示:
debug:
[echo] 打包 bin/samples-debug.apk,并使用调试密钥对其进行签名...
[exec] 调试证书已于 8/4/08 3:43 PM 过期
在 Eclipse/ADT 中,您将在 Android 控制台中看到类似的错误。
要解决此问题,只需删除 debug.keystore 文件即可。 AVD 的默认存储位置在 OS X 和 Linux 上位于 ~/.android/,在 Windows XP 上位于 C:\Documents and Settings\.android\,在 Windows Vista 和 Windows 7 上位于 C:\Users\.android\来源
:Android 发布指南:
http://developer.android.com/guide/publishing/app-signing.html
Expiry of the Debug Certificate
The self-signed certificate used to sign your application in debug mode (the default on Eclipse/ADT and Ant builds) will have an expiration date of 365 days from its creation date.
When the certificate expires, you will get a build error. On Ant builds, the error looks like this:
debug:
[echo] Packaging bin/samples-debug.apk, and signing it with a debug key...
[exec] Debug Certificate expired on 8/4/08 3:43 PM
In Eclipse/ADT, you will see a similar error in the Android console.
To fix this problem, simply delete the debug.keystore file. The default storage location for AVDs is in ~/.android/ on OS X and Linux, in C:\Documents and Settings\.android\ on Windows XP, and in C:\Users\.android\ on Windows Vista and Windows 7.
Source: Android Publishing Guide:
http://developer.android.com/guide/publishing/app-signing.html