In recent days, using Google's design library to write an app, using Android studio to package the app with a few bottlenecks, so the detailed steps to write down.
How to get application signatures in as
Unlike eclipse, Eclipse can be found directly within the software, and as needs to be taken from the command line, first into the. Android directory,
As will apply packaging
As version 1.3, the steps are considered as examples:
- As in build-> Select Generate signed APK and select the app that needs to be packaged, such as:
- After selecting the app, go to this interface:
Because I've been in a bag before. keystore key file, usually first packaged we need to recreate a. JKs keystore file, so we choose Create New ... After that, go to the following interface:
The first one is to ask us to specify the KeyStore file path, we select the Keystoredemo directory under the F disk and name the KeyStore Keystore.jks:
When you click Confirm,
which
Password/confirm-Set the password for the KeyStore
Key
- Alias-Key Name
- Password/confirm-Set the password for the key
- Validity-Key validity time
Then the following is to fill in some areas, companies and other information, these are more casual, but at least need to fill in one, such as:
Then click OK, and then back to just pack that interface, this time the key and password has been automatically filled in, we just need to click Next,
Then finally click Finish,
If there's nothing wrong with your application, you're done packing. Then you can find the packaged apk in your project directory.
As will apply code obfuscation
As in code obfuscation we need to configure the Gragle file
To ture, indicate whether to make code confusion, and then configure your obfuscation code in the Proguard-rules.pro file.
The following is a mistake I encountered when I packaged my code, I used the design library, and then I added in the confusing file:
Found packing time reported such an exception no resource identifier found for attribute ' Layout_behaviour ' in the package *, and then check the information, Discover that it will confuse the design package, delete it, and then package the success!
The purpose of this article is to help the students who have just contacted as and are unfamiliar with them, and Daniel avoids the code.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. Reprint Annotated Source: http://blog.csdn.net/u010687392
Use Android Studio to teach you to confuse app packaging + code