Let the android simulator fly quickly _ eclipse + bluestacks debug Android app 1

Source: Internet
Author: User
Tags android games
Hb1 allows the android simulator to fly quickly _ eclipse + bluestacks debugging Android applications]

I would like to dedicate this article to all my colleagues who have no real machine for debugging.

Address: http://www.cnblogs.com/hbbbs/archive/2012/10/30/2746950.html

Long-term Endurance

Android simulation environments are used to develop Android applications on PCs. However, the running speed of the two widely used simulated environments is unacceptable (the test environment and data are attached at the end of the article ).

  • Android Simulator

The speed of the android simulator has been criticized since version 1.x. the speed and efficiency of the Android Application in the simulator is still a tragedy when it reaches version 4.x! Although Google launched the Intel Atom x86 system image optimized for the X86 platform, the speed has not improved much.

  • Android x86 Platform

The majority of developers can't stand the snail like speed, so they have come up with an android X86 platform running under a virtual machine. On the Internet, I am excited about what I said, for example, "Improving the operating efficiency by 400%.

To get rid of the snail like simulator, I used visualbox4.2.4 + Android x86 (one for version 4.0.4 and one for Version 2.2 ). The results show that the speed is only a little faster than that of the simulator, far less powerful than what the Internet says!

The emergence of sugon

The emergence of bluestacks has led to a new hope for our hard-pressed androidless (KIDS shoes without real machines.

Bluestacks developed the android runtime environment for Windows systems, enabling Android applications to run on Microsoft's operating system, it can run 0.45 million applications, including Angry Birds and Fruit Ninja.

Since we can simulate the running of Android games such as Angry Birds and Fruit Ninja in windows, bluestacks's running efficiency will naturally not be worse. If we can connect eclipse to bluestacks to test our own applications, it will be a wonderful thing!

Ignition

Does eclipse + bluestacks work? Try it! Come on!

Preparations:

  1. Prepare eclipse for debugging the android program using the simulator.
  2. Download bluestacks. Chinese Web site address is http://www.bluestacks.net.cn/Download/, next to the latest version.
  3. Install bluestacks. Not satisfied is that the software does not allow users to specify the installation path and is forcibly installed to the C drive.

Highlights:

Next, let eclipse and bluestacks communicate with each other. The opening sequence of the two software is exquisite. First open bluestacks and then open eclipse.

If you must first enable eclipse and then enable bluestacks, take a look.

  • Enable bluestacks first
  • Open eclipse and switch to the ddms perspective. You can see that the simulation device emulator-5554 of bluestacks has been found in the devices view.

  • Next, find a project to debug. Here I found an example project "avg_opengles" by the author of the lgame framework for testing. First, set "Debug configuarations" for debugging ".

  • On the "target" tab of the open debugging interface, select "Always prompt to pick device ".

  • Debug the "avg_opengles" project. After you click debug, the device selection page is displayed. Select the device of bluestacks and click "OK" to start debugging.

  • The following is the running interface of our android project in bluestacks.

  • If a breakpoint is placed in the program, the application can also be interrupted at the breakpoint. OK, all done! You can see that the FPS reaches 50. Dizzy, which is several times faster than in the simulator.

Data proof

Machine configuration

  • Processor name dualcore Intel Core I3 330 m, 2133 MHz (16x133)
  • Motherboard chipset intel ibex peak-M hm55, Intel ironlake-m
  • System memory 3892 MB (ddr3 SDRAM)
  • Display Adapter Intel (r) HD graphics (256 MB)
  • Computer type ACPI multiprocessor PC (mobile)
  • Operating System Microsoft Windows XP Professional
  • System patch (SP) Service Pack 3

As mentioned above, you must first enable bluestacks, then enable eclipse, and then perform debugging.

If you enable eclipse and then activate bluestacks, this article will introduce the problems and solutions that will be encountered in this method.

Problem presentation

  • Open eclipse and switch to the ddms perspective. There are no devices in the devices view.

  • Next, turn on bluestacks. There are two devices in eclipse. It recognizes bluestacks as two devices and reports a bunch of errors in the console view. At this point, if debugging is performed, although there is no problem, the console view will report a lot of error messages, which is annoying.

Problem Solving

  • Click the downward triangle in the red box in the devices view. The menu is displayed, and then click "Reset ADB.

  • After several seconds, the devices view only identifies one device. OK. You can start debugging. The specific debugging settings are described in the previous article "Let the android simulator fly fast _ eclipse + bluestacks debug the Android Application.

Related Article

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.