Android Basics Getting Started Tutorial--1.9 Android program Signature Package

Source: Internet
Author: User

Android Basics Getting Started Tutorial--1.9 Android program Signature Package

tags (space delimited): Android Basics Getting Started Tutorial

Introduction to this section:

In the penultimate section of the first chapter, this section describes how to package our program into an APK file and sign our APK!
As already stated in the previous section, the IDE used by our follow-up tutorials is Android Studio, so this section is about as (and so on)
For short) under the packaging of the project signed!

1. What is a signature and what is the use of:

Android app requires us to use a certificate to digitally sign the application, otherwise it will not be installed on the Android phone, usually when we debug the runtime to the phone when it is automatically signed with the default key and certificate, but we more than 10 release compile, will not automatically sign, This time we need to do a manual signature!
The following benefits are available for our APK signature:

  • 1. Application Upgrade: If you want users to seamlessly upgrade to a new version, you must sign with the same certificate. This is because only the same certificate is signed and the system is allowed to install the upgraded application. If you have a different certificate, your application will be asked to take a different package name, in which case it is equivalent to installing a completely new application. If you want to upgrade the application, the signing certificate must be the same, the package name is the same!
  • 2. Application modularity: The Android system can allow multiple applications signed by the same certificate to run in one process, and the system actually takes them as a single application, at which point we can deploy our application as a module, and the user can upgrade one of the modules independently.
  • 3. Code or data sharing: Android provides a signature-based permission mechanism, so one application can expose its functionality to another application that is signed with the same certificate. By signing multiple applications with the same certificate and leveraging signature-based permission checks, you can share code and data in a secure way between applications.
    Between different applications, want to share data, or share code, then let them run in the same process, and let them sign with the same certificate.
    ———— This excerpt from: Why does Android need to sign
How 2.Android Studio packs a signature:

OK, because this course is for beginners, multi-channel packaging content to be explained later! This section only says the simplest packaging signature
Yes, 1 says the default generated apk in the debug: app/build/outputs/apk directory!
And Eclipse is not the same, eclipse is generated in the bin directory!

OK, open the Hello World project on our as and click on the menu:

Build -- Generate signed APK ...

② pop-up window, if you don't have a key, create one, and select the key that exists.

③ No, we create a new one, you can fill in the relevant items according to their needs:

④ Good, click OK, you can see our password information, may need us to fill in the password, fill in the following:

⑤ Click Next:

⑥ Click Finish a moment later, the following prompt appears, stating that the application has been packaged and signed successfully:

⑦ can see that the packaged apk is quietly lying in our app directory:

⑧ to the seventh step has been packaged signature completed, if you want to verify whether signed, only need to enter the following CMD command

Summary of this section

There are a lot of ways to pack Android apk, command line, or Gradle,ant,maven, and so on, there are many ways, this section explains the simplest way to pack signatures through a graphical interface! Well, this section is here, the simplest way to pack a signature is get?

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android Basics Getting Started Tutorial--1.9 Android program Signature Package

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.