我找不到 debug.keystore 文件

发布于 2025-01-08 16:13:01 字数 170 浏览 4 评论 0原文

我在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

策马西风 2025-01-15 16:13:01

打开 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.

遗心遗梦遗幸福 2025-01-15 16:13:01

在 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.

╭⌒浅淡时光〆 2025-01-15 16:13:01

我相信它位于 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.

囍孤女 2025-01-15 16:13:01

调试证书的过期

用于在调试模式下对应用程序进行签名的自签名证书(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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文