Android development environment and genymotion virtual machine combined with HBuilder testing (self-Summary), genymotionhbuilder

Source: Internet
Author: User

Android development environment and genymotion virtual machine combined with HBuilder testing (self-Summary), genymotionhbuilder
1. Install android-studio

Https://github.com/inferjay/AndroidDevTools

Bundle Integration Environment

Win7

Jdk (JAVA environment variable Configuration:

"Variable name": Java_Home

"Variable value": C: \ Program Files \ Java \ jdk1.7.0 _ 07

"Variable name": Path

"Variable value": % Java_Home % \ bin; % Java_Home % \ jre \ bin ;.............

"Variable name": ClassPath

"Variable value":.; % Java_Home % \ bin; % Java_Home % \ lib \ dt. jar; % Java_Home % \ lib \ tools. jar

)

Android-studio-bundle

Install apk In the android-studio Simulator for testing:

Place the target application under ". \ Android \ sdk \ platform-tools.pdf", enable cmd.exe at the target location, and enter the following command:

Adb devices ------- check that the virtual device is successfully connected

Adb install xxxxxx.apk ------- install the target application

Ii. Install Genymotion

It requires support for VisualBox to run

 

I didn't install the two in the same directory before, and an error will be reported when Genymotion is started.

After the installation is successful, enter the password of the previously registered account to download the virtual device.

Set bidirectional sharing and drag-and-drop in the V box Virtual Machine

Download genymotion-arm-translation.zip to ensure smooth installation of all apk files. Installation Method: After the simulator is started, drag the compressed package into it and click OK.

If the plug-in causes a screen flash, select the local SDK

Iii. Integration of the two: Install Genymotion plug-in on android-studio in two ways:

Method 1: Open android-studio, choose File> Setting> IDE Settings> Plugins, Click Browse repositories on the right, and enter Genymotion in the search box that appears, find and install the plug-in;

Method 2: Download the IDEA Plugins on the official Genymotion website and repeat the preceding steps to open android-studio, choose File> Setting> IDE Settings> Plugins, and click Install Plugin from disk on the right ].

Restart android-studio and find an icon in the toolbar. Click it. The first configuration points to the installation path of Genymotion.

In this way, you can select a simulation device each time you start it.

Settings in Virtual Machine

Possible problems

Android-Studio if the simulation encounters a Failure [INSTALL_FAILED_OLDER_SDK] problem, it is because the compiled sdk version is too high or the minimum requirement is that the sdk is too high: minSdkVersion = "3"/> downgrade or comment out, But mainfest does not have this line. In fact, you only need to open the following path and find build. open the gradle File

 

Edit minSdkVersion and targetSdkVersion to ensure that the version is no higher than the Simulator version.

Genymotion Chinese Input question

 

When using Chinese for the first time, in the Input Keyboard area, press the Space key with the mouse and select "Google Input Method" in the pop-up box. Then, you can switch between Chinese and English in the lower left corner.

 

 

Enable HBuilder to connect to genymotion Simulator

There may be many ADB instances on the computer.

. \ HBuilder \ tools

. \ Genymobile \ Genymotion \ tools

. \ Android \ sdk \ platform-tools

Worker Process [before kill, you need to know the ip address and port of the startup simulator. For more information, see note 2]. Then, start hbuilder, Enter cmd, enter hbuilder's tools directory, and run:

. \ Adb connect192.168.56.101: 5555

Therefore, hbuilder connects to the simulator.

Note:

1. you cannot save the previous one. \, specify the current path. Because the path environment variable contains the path of androidsdk, it will run to the adb. When the adb starts, it will kill the current adb first, you must specify the adb of the running hbuilder;

2. After a bunch of IPs and ports are reached, start the genymotion simulator in the killall adb.exe process, enter the genymotion tools directory, and run:. \ Adb devices(.. \ Cannot be omitted). The ip address and port of the simulator are displayed in the list;

3. If you know which software adb.exe is running before, right-click adb.exe in the task manager and choose open file location from the shortcut menu.

 

The layout is slag, light spray ~

 

 

 

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.