Android Note (i) First Contact Android

Source: Internet
Author: User
<span id="Label3"></p>1. Download the Android SDK<p><p>Visit Http://developer.android.com/→get the sdk→installing the Android Sdk→stand-alone SDK tools→download the SDK Now</p></p><p><p>Download to get <strong>android-sdk_r24.3.3-windows.zip</strong> compressed package, unzip the</p></p><p><p>  </p></p><p><p>Run SDK Manager.exe, tick the SDK you want to download, and click Install packages to download the Installation.</p></p><p><p>After the download is complete</p></p><p><p>  </p></p><p><p>  </p></p><p><p>Because of the domestic Internet environment, it is possible to download the failure, "tools→options" tick "force https://... sources to be fetched usinghttp://...", if still not, Then it may be necessary for science (fan) to surf the internet (wall).</p></p>2. Download Eclipse and install the ADT plugin<p><p>See Also: http://jingyan.baidu.com/article/b0b63dbfa9e0a74a4830701e.html</p></p>3. Download the Genymotion emulator and install the Android plugin<p><p>Www.genymotion.com</p></p><p><p>Plugin similar to eclipse installation adt, address:<strong>http://plugins.genymotion.com/eclipse/</strong></p></p>4. Create a new Android project and run it on genymotion<p><p>1. New Application project</p></p><p><p>  </p></p><p><p>The rest is the default, so a project is Created.</p></p><p><p>Run as---Android application program runs on genymotion (genymotion emulator needs to be turned On)</p></p><p><p>  </p></p><p><p>  </p></p>5. Analyze the project directory<p><p>After the project has been created successfully, the project structure is as follows</p></p><p><p>  </p></p><p><p>(1) src directory, directory where all Java code is stored</p></p><p><p>(2) Gen directory, which is automatically generated by the system, there is an important file R.java file, we add each picture in the project, each resource, will automatically generate a corresponding resource ID in this file, it should be noted that we added to the project resource name clearly to specification, <strong>do not start with a number or a space, or it is automatically generated</strong> <strong>ID</strong> <strong>will make a mistake</strong> .</p></p><p><p>(3) assets directory, mainly for some files packaged along with the program, the resources stored in this directory will not generate ID in R.java</p></p><p><p>(4) bin directory, which contains some automatically generated files at compile time, and the packaged apk files are also stored in this directory</p></p><p><p>(5) Libs directory, directory for Third-party jar packages</p></p><p><p>(6) Res Directory</p></p><p><p><strong>drawable-hdpi</strong> <strong>, drawable-mdpi</strong> <strong>, drawable-xhdpi</strong> <strong>, drawable-xxhdpi</strong> <strong>, drawable-ldpi</strong> Five directory for each resolution of the picture file, each file stored in the R.java automatically generate an ID.</p></p><p><p>The layout directory is used to store layouts files</p></p><p><p>The values directory is used to store some style files or strings</p></p><p><p>(7) androidmanifest.xml file is the entire project configuration file, the System's components are registered here, You can add a rights statement to the application in this file to tell the system that your program needs to get the Phone's permissions, you can also re-specify the minimum compatible version of the program and the target version</p></p><p><p>(8) project.properties file Specifies the version number of the SDK to use when compiling the program</p></p><p><p></p></p><p><p>The steps from encoding to installing a program are as Follows:</p></p><p><p>1. Writing A. Java file</p></p><p><p>2. The Java compiler compiles. Java files into A. Class file</p></p><p><p>3. Android will escape The. class file into A. Dex file</p></p><p><p>4. Dex files and other resources packaged into a compressed file</p></p><p><p>5. Sign the compressed file to generate the APK file</p></p><p><p></p></p><p><p>Android Note (i) First Contact Android</p></p></span>

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.