Android Application Development and alternative usage of the android SDK tool set

Source: Internet
Author: User

Reprinted please indicate the source:

Louiswang http://blog.csdn.net/louiswangbing/article/details/6606865

I believe that for the majority of Android Application developers, everyone in the android SDK Toolkit can be very skilled in using it, but here I want to introduce how to use the SDK toolkit very well, that is, "alternative usage ".

First of all, most Android applicationsProgramDevelopers develop applications based on the android simulator. Although this development method is very convenient, you can directly use eclipse to integrate the development environment. Basically, you do not need to manually set or operate anything, but there are also several major drawbacks:

1. The memory of the android simulator is limited. If a resource-consuming application is developed, the simulator runs very slowly. As the simulator resolution settings change, the larger the Resolution, the more difficult the simulator will be to develop applications. At this time, some notifications may choose to purchase the Development Board or use an Android mobile phone for application development. But in fact, we have a better way to develop Android applications. Here we will first sell a token.

2. Generally, Android Application Development is implemented on the local machine, that isCodeEditing and simulator running are implemented on the same machine, but have you ever thought about implementing the two on two machines separately, or using virtual machines to simulate the Android system?

Speaking of this, do you think it is interesting?


In fact, Android not only provides the arm version !!! Here to introduce the Android-x86 version, do not know friends can Baidu.

In fact, it is very simple, the use of android-x86 for application development needs to go through a few steps:

1. Find a Linux host or install a virtual machine

2. Download android-x86Source codeAnd compile (I will not introduce this part in detail here, Baidu has a lot of ideas)

3. Run the compiled Android image (usually named generic-x86.iso) with a virtual machine

After a few steps, you can see an Android system similar to the operating system. The advantage is that you can set the memory size and flash size of the system at will, CPU frequency and other hardware attributes make it unnecessary for your application development to consider the impact of various hardware resources on the simulator, you don't have to drink coffee or eat bread and watch the simulator run slowly !!! You can even find a host and install the Android system on a desktop or notebook !!


Write here, the key question comes, some friends may want to ask, so, how to associate the application development with the android-x86 system?

This involves the second part of this article, that is, the alternative usage of the android SDK tool set.


First of all, a silly way: you can compile the android APK application through the U disk mounted to the andriod-x86 system, and then install the application through the U disk. But obviously, I wouldn't write this article either.Article.

In fact, the android SDK toolkit itself has been powerful enough. As long as you carefully look at the usage instructions of the SDK tools, you can find out. Here, I will give a simple description:

The use of the ADB tool is not limited to the use of simulators, but also has more powerful usage.

ADB connect instructions:

According to what you just said, you have run the android-x86 through the virtual machine, or you have a wealth of resources, one not two endless has been installed on another system, then, let's take a look at the detailed steps.

First, you can use Alt + F1 on a VM or a host with an Android system installed. You will be surprised to find that the system still provides a command line interface! In fact, there is nothing strange about this, because Android uses the Linux kernel, and the Linux kernel Alt + F1 is the shortcut key for cutting into the command line interface. Similarly, we need to return to the graphic interface again, alt + F7 is the same as Linux.

After entering the command line interface, run the netcfg command. We can see the IP address of the system. For example, we can see 192.168.1.160.

Next, the alternative use of the ADB tool: ADB connect 192.168.1.160: 5555 (the parameter before the colon is the IP address of your android-x86 system, the parameter behind it is the port number, immutable ).

When it is displayed that the connection is successful, all pig programs are ready.

The following is the time to witness the miracle:

On a Windows host, use the ADB install command to install the APK application on your host, you will be pleasantly surprised to find that the application was installed on the android-x86 system, and it runs fast. I don't know how many times faster than what simulator !!!

What's more, you will find that, after you run the application through eclipse, the simulator has not opened, and this application has magically run to the android-x86 system !!!

What's going on?

In fact, the principle is very simple. At first, when you use ADB install and eclipse to run the program, the program will be installed on the simulator because ADB simulates the connection at this time as a simulator, and when you connect to the android-x86 System Using ADB connect, this "Default Simulator" becomes your virtual machine or another anddroid host, so all operations on the simulator will be performed on the android-x86 system.

Is it amazing?

If you are interested, try again! Although it may take you some time at first, the happiness and efficiency of subsequent development will surely give you unexpected gains !!

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.