Signing an existing apk using debug.keystore generated by eclipse

本秂侑毒 提交于 2019-12-02 20:28:35
Stefan de Bruijn

You don't really want to create it with your debug key, but;

-alias androiddebugkey 
-keystore /the/path/debug.keystore 
-storepass android 
-keypass android
user3717841
jarsigner -verbose -keystore ~/.android/debug.keystore -storepass android -keypass android path/to/my.apk androiddebugkey

This worked for me.

For me, I have create a debug keystore first with all passwords, alias... are 'android' then go to Preferences -> Android -> Build and enter that as Custom debug keystore. Now any my debug will be auto signed with that key without requiring me to do any extra work!

Warning: I have learnt hard from my mistakes. I have uploaded my APK with that debug keystore to Google Store then published it for alpha testing (to test purchasing, signing in Google game play...). First that was very convenience since I could compile and run my app in debug mode without being trouble to re-enter keystore, passwords, create apk, install it on devices...

However, the problem is that after testing, I cannot upload the released apk (with my official keystore) to that project (because it has different key than previous loaded ones). I cannot delete that project either (since it has been published). At the end, I have to keep that one, rename the package of the app, create a new project, update new Google Api id, upload new apk... for official releasing.

Expiry of the Debug Certificate The self-signed certificate used to sign your application in debug mode has an expiration date of 365 days from its creation date. When the certificate expires, you will get a build error.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!