解决Eclipse编译Debug certificate expired的问题

关键字:Android,Eclipse,Debug Certificate expired on

用Eclipse编译的APK默认的Certificate是Debug类型的,Debug类型的证书的有效期限一般是一年。

当我们用Eclipse编译遇到下面的问题时,可以用后面的方法解决。
Error generating final archive: Debug Certificate expired on 10-11-20 下午6:40

The simple solution is to just delete the file “debug.keystore” which is stored in your home directory under “~/.android” (OSX, Linux). A Windows Vista/7 user will find the file in the “C:\Users\<user<\.android folder.

To prevent this brain training procedure for a while a decided to generate a key which lasts 1000 days instead of just the full year. Startup the OSX terminal app or the Linux terminal and go to the “.android” folder. Delete the old certificate file first. Then issue the following command from the command line:

keytool -genkey -keypass android -keystore debug.keystore -alias androiddebugkey -storepass android -validity 1000 -dname “CN=Android Debug,O=Android,C=US”

Now there should be a new certificate file sitting in the folder which lasts 1000 days。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值