Android development-virtual machine usage in VirtualBox environment, androidvirtualbox

Source: Internet
Author: User

Android development-virtual machine usage in VirtualBox environment, androidvirtualbox

After thinking about the question for a long time, I am still so entangled. Let's explain it. Recently, I started to access Android development. I won't talk about the deployment of the development environment. It was hard to solve, and debugging encountered another problem. Android devices are outdated and inefficient. AVD is not to mention. You can see them one by one. Fortunately, there is an artifact, Genymotion! Strongly recommended here ~! The performance is several steps away from various android devices.

But the problem is that I have a hobby. I like to put various development environments into different virtual machines, so that they do not interfere with each other and can bring them together. However, Genymotion cannot be used in virtual machines ~, Prompt that OpenGL2.0 or later is required. However, VirtualBox clearly claimed to support OpenGL2.0 for a long time. Vmware also said it was okay, but no matter how hard it was, there was still no result.

When I was about to give up, I thought of remote debugging to solve this problem, and the results were very satisfactory. The specific process is as follows:

1. Install Genymotion on the host machine and download the required Virtual Machine (this process seems to have to be a wall drill, so it is painful ~~)

2. Set the Network of the VM. As Genymotion depends on VitrualBox, it is equivalent to creating a virtual machine in VirtualBox. Open VirtualBox and you will see that the corresponding virtual machine has been installed. Right-click and select "settings", select "Adapter2" in "Network", and select "Bridged Adapter" in "Attached, click "OK ". I can't explain why I chose "Adapter2", but I hope you can explain it, but the purpose is to allow the virtual machine and the host to have the IP address of the same network segment.

3. Enable the Android Virtual Machine. Generally, there is a status in the about of the Android device setting. You can view the IP address of the current device and write down the IP address. PS: Another app can directly display the IP address, called adbWireless.

4. The virtual machine running the development environment has an adb connect [IP] command in platform-tools under the sdk Directory, which can be called directly under cmd to connect to the IP address of the previous Android virtual device, A prompt is displayed after the operation is successful. So far, we have successfully connected to the Android virtual device in the virtual machine environment.

Start eclipse and run the project, and our virtual Android device will appear on the target device. Then, let's get started. Haha ~

Ps: I am a newbie who just got started with Android development. If you have any questions, I hope you will give me more advice ~

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.