“Debug certificate expired” error in Eclipse Andro

2018-12-31 07:56发布

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?

17条回答
深知你不懂我心
2楼-- · 2018-12-31 08:46

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

查看更多
浮光初槿花落
3楼-- · 2018-12-31 08:47

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.

查看更多
倾城一夜雪
4楼-- · 2018-12-31 08:49

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

查看更多
千与千寻千般痛.
5楼-- · 2018-12-31 08:54

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.

查看更多
美炸的是我
6楼-- · 2018-12-31 08:55

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.

查看更多
心情的温度
7楼-- · 2018-12-31 08:56

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

查看更多
登录 后发表回答