The eclipseandroid CC ++ algorithm uses eclipse to generate APK files under the bin directory. All these files are in the debug version. How can I create the software for the release version?
In fact, it is quite simple.
1. Use the built-in keytool of Java to create the release version of keystoreJava code
- Keytool-genkey-v-keystore keystore_name.keystore
- -Alias alias_name-keyalg RSA-validity 10000
Keystore_name.keystore: name of the release version of The keystore to be created
Alias_name: alias? Take a good note of the name, which will be used later
-Keyalg RSA: generated using the RSA Algorithm
-Validity 10000: validity period, in days
If the Java environment is configured properly, the following information will appear after you enter the command
Enter keystore password: (keystore password)
Re-enter new password: (confirm the keystore password)
What is your first and last name?
[UNKNOWN]: (name. Use your favorite name. I don't know where it will be displayed)
What is the name of your organizational unit?
[UNKNOWN]: (Organization Unit)
What is the name of your organization?
[UNKNOWN]: (organization, I don't know what the difference is from the one above)
What is the name of your city or locality?
[UNKNOWN]: (city)
What is the name of your state or province?
[UNKNOWN]: (state, province, and county)
What is the two-letter country code for this unit?
[UNKNOWN]: CN
Is Cn = unknown, ou = unknown, O = unknown, L = unknown, St = unknown, c = cn correct?
[No]: Yes (confirm the entered information)
Generating 1,024 bit RSA key pair and self-signed certificate (sha1withrsa)
A Validity of 10,000 days
For: Cn = unknown, ou = unknown, O = unknown, L = unknown, St = unknown, c = Cn
Enter key password for <alias_name>
(Return if same as keystore password) :( alias password. If it is the same as the keytore password, press Enter)
Re-enter new password: (confirm the alias password)
[Storing my-release-key.keystore]
2. Create an APK file for release
In eclipse, right-click the project to be released and selectAndroid Tool->Export signed application package...
Step-by-Step: select the generated release version keystore, enter the password, select alias, enter the alias password, and generate the release version APK.
Ah, the world is quiet ~~~
Finally, it is installed.
Because a new signature is used, you must uninstall the original program before installing it.