(original) "android Programming Authority guide" Learning note 01--android app first experience--007

Source: Internet
Author: User
<span id="Label3"></p><p><p><strong>Running an app using the emulator</strong></p></p><p><p>To run an Android app, you need to use a hardware device or virtual device. The Android device emulator, which is included in the development tools, provides a variety of virtual devices.</p></p><p><p>To create an Android virtual device (AVD), in eclipse, Select the Window→android virtual Device Manager menu item, and when the AVD Manager window pops up, Click New ... on the right side of the WINDOW. Button.</p></p><p><p>In the dialog box that pops up, you can see that there are many options for configuring the virtual Appliance. For the first virtual device, we chose to simulate the Galaxy Nexus device running Google Apis-api level 17, as shown in 1-13. Note that <em>if you are using a Windows system, you need to change the memory option value from 1024</em>to a maximum so that the virtual device can function correctly. When the configuration is complete, click OK to Confirm.</p></p><p><p><strong></strong></p></p><p><p>After the AVD was created, we used it to run the Geoquiz app. In the package browser, Right-click the Geoquiz project Folder. In the popup Right-click menu, Select the Run as→android application menu Item. Eclipse automatically finds the new virtual device, installs the app package (APK), and then starts and runs the app. In this procedure, if Eclipse asks whether to use Logcat automatic monitoring, Select "Yes".</p></p><p><p>It may be time consuming to start the virtual machine, please wait patiently. Once the device is up and running, you can click on the button in the app interface to let the toast tell us the Answer. (note that if the app starts running, we don't happen to be near the computer and may need to unlock the AVD when it comes Back.) Like a real device, the AVD will lock automatically for a certain amount of time. )</p></p><p><p>Logcat appears at the bottom of the Eclipse workspace if a crash occurs when the Geoquiz app starts or when we click the Button. View the log to see eye-catching red exception Information. The text column in the log can see the name of the exception and the exact location where the problem Occurred.</p></p><p><p>It is recommended that you keep the emulator running so that you do not have to wait for the AVD to start when you repeatedly run the debug Application. Click the fallback button (the U-arrow button on the AVD emulator) to stop the app. When you need to debug changes, rerun the app through Eclipse.</p></p><p><p>  <em>while the simulator is useful, testing your application on a real device can result in more accurate results</em> .</p></p><p><p>(star Month: Probably most people encounter this situation, running on the simulator is not a problem, on the real machine can not run.) so, everything is based on the real Machine. When the machine encounters the problem, trace the log or debug with Debug mode to find the Problem. )</p></p><p><p>(original) "android Programming Authority guide" Learning note 01--android app first experience--007</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.