<span id="Label3"></p><p><p>Recently from Eclipse to Android Studio IDE, a lot of things need to be learned, this article is a Record.</p></p><p><p></p></p><p><p><span style="font-size: 18px;"><strong>Project structure</strong></span></p></p><p><p>In Anroid Studio, A project consists of multiple module, and the manifest.xml contained under each module is also effective (formerly ineffective under Eclipse)</p></p><p><p>The library in Eclipse corresponds to the module in Anrdroid Studio.</p></p><p><p></p></p><p><p><span style="font-size: 18px;"><strong>Debugging</strong></span></p></p><p><p><span style="font-size: 16px;">In eclipse, we often use the run as debug ... Method (in Debug mode), or use DDMS to find the process point (green bug Mark) listed under the Device.</span></p></p><p><p><span style="font-size: 16px;">In Android Studio, we can still debug with debug mode Startup. But we can no longer use DDMS to debug, in the menu "Run" under the "attach debugger to process", you can attach the debugger to the process to debug, more Convenient.</span></p></p><p><p></p></p><p><p><span style="font-size: 18px;"><strong>Compile</strong></span></p></p><p><p><span style="font-size: 16px;">Have to learn gradle, to understand that the program has two packaging methods (debug and Release) two, We need to configure the project module in a different key store to maintain the respective configuration Items. Like what:</span></p></p><p><p><span style="font-size: 16px;">1. We configure the Debug key store under the debugging configuration and do not start confusion</span></p></p><p><p><span style="font-size: 16px;">2. Configure release to release the key, start confusion</span></p></p><p style="margin-left: 30px;"><p style="margin-left: 30px;"><strong><span style="font-size: 16px;">How do I configure Degbug key?</span></strong></p></p><p style="margin-left: 60px;"><p style="margin-left: 60px;"><span style="font-size: 16px;">Right-click on the module, Select "open module settings", Select the signing tab, click the plus sign, enter the name of the configuration item (name), fill in your KeyStore alias, path and Password.</span></p></p><p style="margin-left: 30px;"><p style="margin-left: 30px;"><strong><span style="font-size: 16px; line-height: 24px;">How do you relate the configuration of the key in the previous step to the packaging method?</span></strong></p></p><p style="margin-left: 60px;"><p style="margin-left: 60px;"><span style="font-size: 16px; line-height: 24px;">To continue to the previous step, select "build types", Select Signing config, and in the Drop-down box, locate the name of the previous configuration, which establishes the Association.</span></p></p><p style="margin-left: 30px;"><p style="margin-left: 30px;"><strong><span style="font-size: 16px; line-height: 24px;">How to carry out packaging, and fight that kind of bag? Debug package or Release package?</span></strong></p></p><p style="margin-left: 60px;"><p style="margin-left: 60px;"><span style="font-size: 16px; line-height: 24px;">Click on the bottom left corner of the screen (which block in the most left corner) will pop up a menu, select "build variants", pop up a small window, where you can find your module, the debug switch to release is Ok. That is, the packaged mode is Switched.</span></p></p><p style="margin-left: 30px;"><p style="margin-left: 30px;"><strong><span style="font-size: 16px; line-height: 24px;">Where is the APK where I packaged the output?</span></strong></p></p><p style="margin-left: 60px;"><p style="margin-left: 60px;"><span style="font-size: 16px; line-height: 24px;">Under the outputs under the build under the root folder of your project (module) under Apk. That is, Under/build/outputs/apk. Here is your apk with the name of Debug.</span></p></p><p style="margin-left: 60px;"><p style="margin-left: 60px;"><span style="font-size: 16px; line-height: 24px;">You can also package by entering instructions under the command prompt line (terminal).</span></p></p> <ul> <ul> <li style="list-style-type: none;"> <ul> <li>Gradle Assembledebug</li> <li>Gradle Assemblerelease</li> </ul></li> </ul> </ul><p style="margin-left: 60px;"><p style="margin-left: 60px;"><span style="font-size: 16px; line-height: 24px;">or use "grdle assemble"<strong> </strong> to package both release and Debug.</span></p></p><p><p></p></p><p><p></p></p><p><p></p></p><p><p>Reference:</p></p><p><p>http://stormzhang.com/devtools/2014/12/18/android-studio-tutorial4/</p></p><p><p>http://stormzhang.com/devtools/2015/01/15/android-studio-tutorial6/</p></p><p><p></p></p><p><p>Android Studio Learning Notes (1)</p></p></span>
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