- Generate a private key using
keytool
. For example:$ keytool -genkey -v -keystore my-release-key.keystore-alias alias_name -keyalg RSA -keysize 2048 -validity 10000
This example prompts you for passwords for the keystore and key, and to provide the Distinguished Name fields for your key. It then generates the keystore as a file calledmy-release-key.keystore
. The keystore contains a single key, valid for 10000 days. The alias is a name that you will use later when signing your app. - Compile your app in release mode to obtain an unsigned APK.
- Stand on google_play_services first then run below commands
android update lib-project --path .
ant clean
ant release
stand on your project root folder
android update lib-project --path .
ant clean
ant release
make sure your project file is updated with
android.library.reference.2=../../Android/sdk/extras/google/google_play_services/libproject/google-play-services_lib - Sign your app with your private key using
jarsigner
: -
$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1-keystore my-release-key.keystore my_application.apk alias_name
This example prompts you for passwords for the keystore and key. It then modifies the APK in-place to sign it. Note that you can sign an APK multiple times with different keys. - Verify that your APK is signed. For example:
$ jarsigner -verify -verbose -certs my_application.apk
- Align the final APK package using
zipalign
.$ zipalign -v 4 your_project_name-unaligned.apk your_project_name.apk
zipalign
ensures that all uncompressed data starts with a particular byte alignment relative to the start of the file, which reduces the amount of RAM consumed by an app - How to check your details in the keystore
keytool -list -keystore .keystore
keytool -list -keystore .keystore -alias foo
List all info ::
How to find that debug SHA1 ley to be used by Android MAP key
keytool -list -v -keystore C:\Users\<username>\.android\debug.keystore
password : android
keytool -exportcert -alias androiddebugkey -keystore C:\Users\ssaho3\.android\debug.keystore -list -v
keytool -exportcert -alias androiddebugkey -keystore C:\Users\ssaho3\.android\debug.keystore -list -v
Honestly, it's a Nice Article Amazing Facts About App Development We have interesting services on app development company in hyderabad | mobile app development companies in madhapur | mobile app development hyderabad | mobile application development company hyderabad | mobile application development companies in hyderabad | best mobile app development company in hyderabad | mobile application development company in hyderabad | mobile development company hyderabad | mobile app development services in hyderabad | best mobile app developers in hyderabad
ReplyDeleteWhich benefits you Thank you!