“调试证书已过期” Eclipse Android 插件出错

发布于 2024-11-02 07:15:37 字数 208 浏览 2 评论 0原文

我正在使用 Eclipse Android 插件来构建一个项目,但我 在控制台窗口中出现此错误:

[2010-02-03 10:31:14 - androidVNC]Error generating final archive:
Debug certificate expired on 1/30/10 2:35 PM!

如何修复它?

I am using Eclipse Android plugins to build a project, but I am
getting this error in the console window:

[2010-02-03 10:31:14 - androidVNC]Error generating final archive:
Debug certificate expired on 1/30/10 2:35 PM!

How do I fix it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(18

温柔戏命师 2024-11-09 07:15:37

Linux 和 Mac OS X 上删除 ~/.android/debug.keystore 下的调试证书;该目录类似于 Windows 上的 %USERPROFILE%/.android

当您下次尝试构建调试包时,Eclipse 插件应该会生成一个新证书。您可能需要清理然后构建才能生成证书。

Delete your debug certificate under ~/.android/debug.keystore on Linux and Mac OS X; the directory is something like %USERPROFILE%/.androidon Windows.

The Eclipse plugin should then generate a new certificate when you next try to build a debug package. You may need to clean and then build to generate the certificate.

花间憩 2024-11-09 07:15:37

安装后,Android SDK 会在名为 debug.keystore 的密钥库中为您生成一个 debug 签名证书。 Eclipse 插件使用此证书对生成的每个应用程序构建进行签名。

不幸的是,调试证书的有效期只有 365 天。要生成新的,您必须删除现有的 debug.keystore 文件。它的位置取决于平台 - 您可以在首选项 - Android - 构建 - 默认调试密钥库中找到它。

Upon installation, the Android SDK generates a debug signing certificate for you in a keystore called debug.keystore. The Eclipse plug-in uses this certificate to sign each application build that is generated.

Unfortunately a debug certificate is only valid for 365 days. To generate a new one you must delete the existing debug.keystore file. Its location is platform dependent - you can find it in Preferences - Android - Build - Default debug keystore.

梦里泪两行 2024-11-09 07:15:37

必须删除所有开发 .apk 文件是一件很痛苦的事情,因为新证书不匹配,因此您无法在所有 AVD 中升级它们。您还必须获得另一个开发 MAP-API 密钥。还有另一个解决方案。

您可以在 debug.keystore 中创建您自己的调试证书,无论您想要什么过期时间。在 HOME 目录下的 .android 文件夹中执行此操作:

keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -validity 14000

keytool.exe 可以在 JDK bin 文件夹中找到(例如 C Windows 上的:\Program Files\Java\jdk1.6.0_31\bin\)。

ADT 将证书上的名字和姓氏设置为“Android Debug”,组织单位设置为“Android”,两个字母的国家/地区代码设置为“US”。您可以将组织、城市和州值保留为“未知”。本示例使用的有效期为 14000 天。您可以使用任何您喜欢的值。

It's a pain to have to delete all your development .apk files, because the new certificate doesn't match so you can't upgrade them in all your AVDs. You have to get another development MAP-API key as well. There's another solution.

You can create your own debug certificate in debug.keystore with whatever expiration you want. Do this in the .android folder under your HOME directory:

keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -validity 14000

keytool.exe can be found in the JDK bin folder (e.g. C:\Program Files\Java\jdk1.6.0_31\bin\ on Windows).

ADT sets the first and last name on the certificate as "Android Debug", the organizational unit as "Android" and the two-letter country code as "US". You can leave the organization, city, and state values as "Unknown". This example uses a validity of 14000 days. You can use whatever value you like.

烦人精 2024-11-09 07:15:37

在 Vista 上,这有效:

  1. DOS:del c:\user\dad\.android\debug.keystore

  2. ECLIPSE:在项目中,清理项目。关闭日食。重新打开 Eclipse。

  3. ECLIPSE:启动模拟器。从模拟器中删除应用程序。

你可以走了。

当我说这个错误时我非常担心,但我通过阅读这里并玩了 10 分钟修复了它。

On Vista, this worked:

  1. DOS: del c:\user\dad\.android\debug.keystore

  2. ECLIPSE: In Project, Clean the project. Close Eclipse. Re-open Eclipse.

  3. ECLIPSE: Start the Emulator. Remove the Application from the emulator.

You are good to go.

I was pretty worried when I say that error, but I fixed it from reading here and playing around for 10 minutes.

黎歌 2024-11-09 07:15:37
  • WINDOWS

删除:debug.keystore
位于
C:\Documents and Settings\\[user]\.android,清理并构建您的项目。

  • Windows 7
    转到 C:\Users\[用户名]\.android 并删除 debug.keystore 文件。

清理并构建您的项目。

  • MAC

删除位于 ~/.android/debug.keystore 中的密钥库 清理并构建您的项目。

在所有选项中,如果您无法获取新的 debug.keystore,只需重新启动 eclipse。

  • WINDOWS

Delete: debug.keystore
located in
C:\Documents and Settings\\[user]\.android, Clean and build your project.

  • Windows 7
    go to C:\Users\[username]\.android and delete debug.keystore file.

Clean and build your project.

  • MAC

Delete your keystore located in ~/.android/debug.keystore Clean and build your project.

In all the options if you can´t get the new debug.keystore just restart eclipse.

够运 2024-11-09 07:15:37

在 Windows 7 中,它位于路径中

C:\Users\[username]\.android
  • ,转到此路径并删除 debug.keystore
  • 清理并构建您的项目。

In Windows 7 it is at the path

C:\Users\[username]\.android
  • goto this path and remove debug.keystore
  • clean and build your project.
埋情葬爱 2024-11-09 07:15:37

如果项目调试过程中证书过期,则必须手动卸载

请执行
在 shell 中 adb uninstall

If a certificate expires in the middle of project debugging, you must do a manual uninstall:

Please execute
adb uninstall <package_name> in a shell.

夏见 2024-11-09 07:15:37

在 Mac 上,打开终端(应打开当前用户的目录),cd“.android”(“ls”以验证 debug.keystore 是否存在)。最后“rm debug.keystore”删除该文件。

On a Mac, open the Terminal (current user's directory should open), cd ".android" ("ls" to validate debug.keystore is there). Finally "rm debug.keystore" to remove the file.

冷月断魂刀 2024-11-09 07:15:37

Android SDK 在名为 debug.keystore 的密钥库中为您生成一个“调试”签名证书。Eclipse 插件使用此证书对生成的每个应用程序版本进行签名。

不幸的是,调试证书的有效期只有 365 天。要生成新的,您必须删除现有的 debug.keystore 文件。它的位置取决于平台 - 您可以在首选项中找到它 -> Android -> 构建 -> *默认调试密钥库。

如果您使用的是 Windows,请按照以下步骤操作。

DOS:del c:\user\dad.android\debug.keystore

Eclipse:在项目中,清理项目。关闭日食。重新打开 Eclipse。

Eclipse:启动模拟器。从模拟器中删除应用程序。

如果您使用的是 Linux 或 Mac,请按照以下步骤操作。

.android 文件夹中手动删除 debug.keystore

您可以像这样找到 .android 文件夹: home/username/.android

注意:默认的 .android 文件将被隐藏。

因此,单击地点菜单。在选择主文件夹下。在单击“查看”下,单击“显示隐藏文件”,然后 .android 文件夹将可见。

.android 文件夹 中删除 debug.keystore

然后清理你的项目。现在Android将生成一个新的.android文件夹文件。

The Android SDK generates a "debug" signing certificate for you in a keystore called debug.keystore.The Eclipse plug-in uses this certificate to sign each application build that is generated.

Unfortunately a debug certificate is only valid for 365 days. To generate a new one, you must delete the existing debug.keystore file. Its location is platform dependent - you can find it in Preferences -> Android -> Build -> *Default debug keystore.

If you are using Windows, follow the steps below.

DOS: del c:\user\dad.android\debug.keystore

Eclipse: In Project, Clean the project. Close Eclipse. Re-open Eclipse.

Eclipse: Start the Emulator. Remove the Application from the emulator.

If you are using Linux or Mac, follow the steps below.

Manually delete debug.keystore from the .android folder.

You can find the .android folder like this: home/username/.android

Note: the default .android file will be hidden.

So click on the places menu. Under select home folder. Under click on view, under click show hidden files and then the .android folder will be visible.

Delete debug.keystore from the .android folder.

Then clean your project. Now Android will generate a new .android folder file.

献世佛 2024-11-09 07:15:37

几周前我遇到了这个问题。我首先在 Android 开发者网站上尝试了故障排除,但没有成功。之后我重新安装了Android SDK,这解决了我的问题。

I had this problem couple of weeks ago. I first tried the troubleshooting on the Android developer site, but without luck. After that I reinstalled the Android SDK, which solved my problem.

花海 2024-11-09 07:15:37

嗯。有趣的是,这么多人对此的经历略有不同。我记得当时这被认为是软件尚未准备好发布的标志,并且团队实际上会在用户开始看到这些问题之前修复它:(

我自己的经历有点不同。我已经尝试过 Project>Clean ,但仍然遇到相同的构建失败。然后我删除了 debug.keystore (在 .android 下),就像第一个答案所说的那样。然后我再次进行了清理,奇迹中的,它

现在 起作用了!不要误会我的意思,我很高兴由于该线程中的提示而使其正常工作,但显然 clean 无法正常工作,并且在我删除密钥库后它是如何找到过期密钥的??? Eclipse 或 ADT 有问题——不太确定是哪一个。

H-m-m-m. Interesting how so many people have had slightly different experiences with this. I remember the days when this was considered a sign that the software was not ready for release, and the team would actually fix it BEFORE users started seeing these problems:(

My own experience was just a little different. I had already tried Project>Clean, but still got the same build failure. Then I deleted the debug.keystore (under .android) just as the first answer said. Still got the same problem. Then I did a clean again, and wonder of wonders, it worked!

Now don't get me wrong, I am glad that I got it working thanks to the hints in this thread. But clearly clean isn't working right, and how did it find an expired key after I deleted the keystore??? Clearly something is wrong with Eclipse or the ADT -- not so sure which.

陪你到最终 2024-11-09 07:15:37

在 Ubuntu 上,这有效:

我转到 home/username/.android 并将 keystore.debug 重命名为 keystoreold.debug。然后我关闭 Eclipse,启动 Eclipse,SDK 在该文件夹中创建了新证书 keystore.debug

然后,您必须卸载/重新安装通过 USB 调试或未签名的 APK(“未签名”APK = 使用调试证书签名)安装的应用程序。

On Ubuntu, this worked:

I went to home/username/.android and I renamed keystore.debug to keystoreold.debug. I then closed Eclipse, started Eclipse, and SDK created new certificate keystore.debug in that folder.

You then have to uninstall/reinstall apps you installed via USB Debugging or an unsigned APK ("unsigned" APK = signed with debug certificate).

深者入戏 2024-11-09 07:15:37

首先关闭 eclipse,然后

通过 Window Key + R 或通过 以管理员身份运行 打开 CMD

执行以下步骤。

del "%USERPROFILE%\.android\debug.keystore"
keytool -genkey -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android -keyalg RSA -validity 30000

重新启动 eclipse 后

First close the eclipse then

Open CMD by Window Key + R or via Run as Admin

Follows the following step

del "%USERPROFILE%\.android\debug.keystore"
keytool -genkey -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android -keyalg RSA -validity 30000

after this restart eclipse.

南烟 2024-11-09 07:15:37

对于 Windows XP,请转到 C:\Documents and Settings\%userprofile%\.android 并删除 debug.keystore 文件,重新启动 Eclipse,现在您的项目将正确构建。

示例路径:

C:\Documents and Settings\raja.ap\.android\

阅读此处了解更多

For windows xp go to C:\Documents and Settings\%userprofile%\.android and delete debug.keystore file, restart the eclipse and now your project get build without error.

Example path:

C:\Documents and Settings\raja.ap\.android\

read-here-for-more.

淡淡離愁欲言轉身 2024-11-09 07:15:37

在 Windows 中,debug.keystore 文件位于 C:\Users\%Username%\.android 文件夹中。该文件是在您安装 Android SDK 时创建的,有效期仅一年。在此期间之后,您将开始收到此错误获取最终存档时出错:调试证书已于 xx/xx/xxxx 过期

要消除此错误,只需删除该文件并再次运行该程序即可。在我的 Eclipse 中,我启用了Project->Build Automatically,因此它可以直接工作,但如果您禁用它,则需要清理项目Project->Clean。 . 选择您的项目并按确定。然后你需要手动构建它。第三次单击您的项目并选择构建项目。(注意 - 如果您在项目菜单中禁用了自动构建功能,您只会看到此选项)

In Windows debug.keystore file is localtes at C:\Users\%Username%\.android folder. This file is created when you install your android SDK and is valid only for a year. After this perod you will start getting this error Error getting final archive: Debug certificate expired on xx/xx/xxxx.

To remove this error simply delete the file and run the program again. In my Eclipse I have enabled Project->Build Automatically so it directly worked but in case you have disabled it you will need to clean the project Project->Clean.. select your project and press ok. Then you will need to build it manually. 3rd click on your project and select Build project.(Note - You will only see this option if you have diabled Build Automatically feature in your Projects Menu)

亽野灬性zι浪 2024-11-09 07:15:37

在 Eclipse 中安装 Android SDK 后,它会在名为 debug.keystore密钥库中为您生成一个调试签名证书。 Eclipse 插件使用此证书对生成的每个应用程序构建进行签名。

现在,这个调试证书的问题是它的有效期只有一年,即 365 天。 如果您的 Eclipse IDE 使用过期的调试证书,您将无法创建和/或部署 Android 应用

要解决此问题,您所需要做的就是删除 debug.keystore 文件。

  1. 转到首选项
  2. Android
  3. 构建
  4. 默认调试密钥库

您应该在其中看到该文件所在的文件夹。只需删除该文件即可。

欲了解更多信息。你可以访问

http://developer.android.com/tools/publishing/app-签名.html

After you install the Android SDK in Eclipse, it generates a debug signing certificate for you in a keystore called debug.keystore. The Eclipse plug-in uses this certificate to sign each application build that is generated.

Now, the problem with this debug certificate is that it is only valid for a year, or 365 days. If your Eclipse IDE uses an expired debug certificate, you will not be able to create and/or deploy an Android app.

To fix this problem all you need to do is delete the debug.keystore file.

  1. Go to Preferences
  2. Android
  3. Build
  4. Default debug keystore

There you should see the folder where the file is located. Simply delete that file and you are good to go.

For more info. you can visit

http://developer.android.com/tools/publishing/app-signing.html

东风软 2024-11-09 07:15:37

要解决此问题,只需删除 debug.keystore 文件即可。

AVD 的默认存储位置是

在 OS X 和 Linux 上位于 ~/.android/ 中。

在 Windows XP 上位于 C:\Documents and Settings\.android\

在 Windows Vista 和 Windows 7 上位于 C:\Users\.android\ 中。

另请参阅此链接,它可能会有所帮助。

http://developer.android.com/tools/publishing/app-signing.html

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

In C:\Users\.android\ on Windows Vista and Windows 7.

Also see this link, which can be helpful.

http://developer.android.com/tools/publishing/app-signing.html

只想待在家 2024-11-09 07:15:37

删除位于 C:\Users\%Username%\.android 文件夹中的 debug.keystore。然后运行该应用程序。它将生成新的。

Delete the debug.keystore located at C:\Users\%Username%\.android folder. Then run the app. It will generate the new one.

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