An overview of the

There is a lot to learn about the recent transition from Eclipse to the Android Studio IDE, and this article is a document.

The project structure

In Anroid Studio, a Project consists of multiple modules, and the manifest.xml contained within each Module is also valid (previously unavailable under Eclipse).

A Library in Eclipse can correspond to a Module in Anrdroid Studio.

debugging

In Eclipse, we often use Run as Debug… (debug mode), or use the DDMS to find the process points listed under the device (marked with green bugs) to debug.

In Android Studio, we can still launch in Debug mode to debug. Instead of using DDMS for debugging, there is a “Attach debugger to Process” under the “Run” menu, which makes it easier to attach the debugger to the process.

compile

We have to learn Gradle, to understand that programs are packaged in two ways (debug and release), we need to configure different key stores for modules in the project to maintain their configuration items. Such as:

1. We configure the DEBUG key store under the debug configuration, and do not start confusion. 2. Configure release to be configured as the key for publication, starting obfuscation

How to configure the Degbug key?

Right-click on Module, select “Open Module Settings “, select the Signing TAB, click the plus sign, enter the name of the configuration item, and fill in the alias, path and password for your keystore.

How do you relate the key configuration from the previous step to the packaging approach?

Continue where you were in the previous step, select “Build types”, select Signing Config and find the name of the previous configuration in the drop down box.

How do you do the packing, and what kind of packing? Debug package or Release package?

Click on the lower left corner of the screen and a menu will pop up. “Build” will bring up a small window where you will find your Module and change Debug to Release. That is to switch the packaging mode.

Where is the APK I packaged for output?

Outputs under APK under Build in your project’s root folder. The/build/outputs/apk. The file name with debug is your APK.

You can also enter commands at the terminal command line to package.

Gradle assembleDebug Gradle assembleRelease or use "Grdle Assemble" to assemble both Release and Debug.Copy the code

Reference:

Stormzhang.com/devtools/20…

Stormzhang.com/devtools/20…