Replace the default debug. keystore File With debug. keystore.

Source: Internet
Author: User

Replace the default debug. keystore File With debug. keystore.

Recently, in the development process, it was very troublesome to frequently sign the apk for testing colleagues. Therefore, I wanted to use the default debug for Intellij idea or Eclipse. replace the keystore file with the signature file used for distribution (production environment), so that it can run directly without frequently signing the apk file.
If you directly use the production keystore for debugging, an error will be reported during compilation:
Android Packager: [trunk] java. io. IOException: Keystore was tampered with, or password was incorrect.
When debugging with a custom keystore, you must keep the password, alias, and alias of the custom keystore consistent with the default debug. keystore. Therefore, you must modify the information about the production keystore.
ProcedureThe following uses the production keystore name android. keystore as an example:
① Modify the alias of android. keystore
Keytool-changealias-keystore android. keystore-alias android-destalias androiddebugkey
② Modify the alias password of android. keystore
Keytool-keypasswd-keystore android. keystore-alias androiddebugkey
③ Modify the password of android. keystore
Keytool-storepasswd-keystore android. keystore
④ Copy the modified android. keystore to the. android directory under % userprofile %, change it to debug. keystore, and run the code again.
Note:
① The default debug. keystore password is "android", that is, the password of the signature file should be changed to "android ".
② Keytool is a tool provided by jdk, path: % JAVA_HOME % \ bin

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.