Android Studio Signature

Source: Internet
Author: User

A. Configure the Build.gradle script file to add the following to the Android node:

Signingconfigs {
Config {
StoreFile file (' e:/ipc/packaging related/signature/ivy-app.keystore ')
Keypassword ' Landinghome2014ivy '
Keyalias ' Ivy '
Storepassword ' Landinghome2014ivy '
}
}
Buildtypes {debug {
Debuggable true
Signingconfig Signingconfigs.config
}
Release {
Minifyenabled false
Proguardfiles getdefaultproguardfile (' proguard-android.txt '), ' Proguard-rules.pro '
Signingconfig Signingconfigs.config
}
}

B. Enter the command in the Terminal command line panel:
Gradlew clean//Empty the previous build directory

Gradlew Build//Rebuild project and build four apk when finished

Note: If you do not want to enter the signature key in the configuration file, you can do so as follows:

A custom method to get the secret key string by typing from the console:

def GetPassword () {
System. Console (). printf ("\ n Please enter the signature file key: \ n")
Return System. Console (). ReadLine ()
}

b then modify the value of the signature password in the signature configuration

Signingconfigs {
Config {
StoreFile file (' e:/ipc/packaging related/signature/ivy-app.keystore ')
Keypassword GetPassword ()
Keyalias ' Ivy '
Storepassword GetPassword ()
}
}

C Finally, as with the previous apk, enter the command at the command line:

Gradlew Clean

Gradlew Build

will prompt for a signature secret key

D after entering the password, wait for the run to complete to generate APK

Android Studio Signature

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.