2

I have an ionic application that I want to publish on the google play store. I have set the path, but I cant sign the unsigned apk. I am using a cmd to do this. My apk and my keystore are not in the same map. Maybe that is the problem?

Thanks in advance!

Mret sezen
  • 73
  • 2
  • 7

2 Answers2

6

I solved this issue by adding jdk bin folder to path in environment variables. it should look like this:

C:\Program Files\Java\jdk1.8.0_121\bin

Inside this bin folder you can find all programs like keytool,jarsigner etc..

steps to sign the apk : refer this answer

Community
  • 1
  • 1
varun aaruru
  • 2,920
  • 1
  • 20
  • 36
1

It is very easy to sign your apk file using ionic. Go to platform -> android and keep your keystore file and release-signing.properties file. The release signing.properties file should be like storeFile=***.keystore keyAlias=*** storePassword=**** keyPassword=****

after that you need to build with this command

ionic build android --prod --release

then signed apk is generated in your apk folder. You dont need to execute jarsigner command every time. Just execute above command to sign apk file.After that put your apk file in latest build tools folder and zipalign it using

zipalign -v 4 {signed apk file name}.apk {output file name}.apk

then upload your output apk file into playstore

Surya Teja
  • 1,388
  • 3
  • 16
  • 32