简体   繁体   中英

How to sign my already made android app/.apk file

I have made an Android Live wallpaper application using a software and the app is running perfectly on my device so I thought about uploading it to Playstore.When I uploaded my app it game me following error :

**

"You uploaded an APK signed with a certificate that expires too soon. You need to sign your APK with a certificate that expires farther into the future."

Now how I can sign my certificate again ? Please I need detailed tutorial !

您必须创建一个新的签名密钥,该密钥将在25年左右到期,并为您的应用程序签署该密钥

to generate map key:=

go to C:\\users....android. keytool -list -alias androiddebugkey -keystore C:\\users....android\\debug.keystore -storepass android -keypass android MD5 finger print: 79:9F:B9:2B:F0:51:C8:48:2E:39:5B:72:AB:42:24:91 map key: 0lujtKtuh8x_MfEUSN5OpCj6HVCxX9lvBDgCT2w


to generate certificate:=

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 password1- ...,123

password2- ....,1234

previous map key generated : 0Vd9Hpw3AaaLfuaYgC8btoNu8OkuZe4bPXD9oPg

You need to:

  • Create a release.keystore (it not already done):
    keytool -genkey -v -keystore release.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

  • Remove the old signature:
    zip -d foo.apk META-INF/\\*

  • Sign with the new key:
    jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore release.keystore my_application.apk alias_name

  • Verify the signature:
    jarsigner -verify -verbose -certs my_application.apk

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM