Once in a while the SDK shows some hickups – usually easy to solve. As this one. Today i got this error message “Error generating final archive: Debug certificate expired on …” while building an apk file inside Eclipse to be run in the emulator on a machine which has not been used for a while.
If you are using IntelliJ 9 with the Android plugin the error message looks like this:
Well, the idea to just update all components to the current state and then to compile a project to check it out on this backup development system went from a 10 min cruise to the unexpected question “Whats wrong?”.
Looking at the error message it was clear that the build process wanted to use a certificate which timed out. The Android SDK is using certificates to sign all the apk files even ther files which run in the emulator (fair enough). The cert is usually valid for just 365 days which means that you get the same error next time shortly after forgetting how you’d solve it last time.
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.
After deleting the file just “clean” your project and build int from scratch and the error should be gone.
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 – enough to really forget how you solved this issue last tim
分享到:
相关推荐
解决这个问题通常有以下几种方法: 1. **购买正式许可证**:最直接的解决方式是通过Adobe官方网站购买Flash Builder的正式许可证,这样可以获得持续的更新和支持。 2. **使用旧版本**:如果预算有限或者不需要最新...
Page Expired(解决方案).md
Atom是一款由GitHub开发的开源文本编辑器,被誉为“21世纪的可扩展编辑器”。它以其高度可定制性、跨平台支持以及丰富的插件生态系统而备受开发者喜爱。在这个绿色版本中,无需安装过程,用户可以直接运行,方便快捷...
Invalid or expired token(解决方案).md
MyEclipse 8.5 注册--取消MyEclipse Trial Expired解决办法
### ireasoning mib browser License Expired 解决办法 #### ireasoning mib browser简介 ireasoning mib browser是一款非常实用的MIB(Management Information Base)浏览器工具,广泛应用于网络管理和监控领域。...
Session Expired(解决方案).md
Subscription Expired(解决方案).md
Lease Expired(解决方案).md
Cache Entry Expired(解决方案).md
wso2 新增OpenSSL生成並使用CA根證書籤名Keytool生成的證書請求 相關流程心智圖展開
- `x509: certificate has expired or is not yet valid` - `http: TLS handshake error from ...: remote error: tls: bad certificate` - `serverhttps://127.0.0.1:6443/cacerts is not trusted: Get ...
[Sun Nov 27 16:46:38 2016] [error] SSL Library Error: -8181 Certificate has expired [Sun Nov 27 16:46:38 2016] [error] Unable to verify certificate 'Server-Cert'. Add "NSSEnforceValidCerts off" to nss...
在遇到TTL expired in transit错误时,关键在于识别错误的类型并采取相应的解决措施。如果错误是由于路由跳数过多导致的,增加TTL值可能会解决问题。若错误是由于路由环路导致的,则需要运营商对网络路由进行调整和...
然而,在日常使用中,我们可能会遇到各种错误,其中之一就是错误代码1862,提示“your password has expired”。这个错误通常发生在MySQL的安全策略要求定期更改密码,而用户未及时更新的情况下。 解决MySQL错误...
Session has expired解决方案(亲测可用)