# Titanium with genymotion

Author : lovecicy

Titanium是一个由Appcelerator提供的一个IDE，类似于PhoneGap，是一个一用JS编写移动应用的工具。

GenyMotion则是一个Android模拟器，用来代替官方的Android模拟器。

set ANDROID_PLATFORM_TOOLS="path\to\Android_SDK\sdk\platform-tools"
set ANDROID_TOOLS="path\to\Android_SDK\sdk\tools"
set path=%path%;%ANDROID_PLATFORM_TOOLS%;%ANDROID_TOOLS%

Genymotion已经有了Eclipse插件，但是Titanium目前还不支持，所以需要手动连接Genymotion和Titanium了。

// normal Titanium app
titanium build --platform=android --build-only

// Alloy app
Alloy compile --config platform=android

adb -s 192.168.56.101:5555 install -r build/android/bin/app.apk

PS 如果在运行中碰到错误，请检查Titanium所需的所有软件及环境变量有没有配置。

Update:

Step 1. Start VirtualBox, go to menu File/Preferences menu, go to Network section, select Host-only Networks tab.

If you don’t have any adapter defined, then you can create one (as indicated below) or you can ignore step 1 and Genymotion will create it when you try to start the VM.

If you do have an adapter there (vboxnet0) click the edit button. In the edit window, you must have DHCP server enabled AND the IP address and allocation pool of the server must be inside same network as the IP of the network controller. For example, I use:

• DHCP server enabled checked (on DHCP server tab)

Still in VirtualBox, select the Android VM you have, click Settings button, select Network section. In the Adapter 1 tab, you should have:

• Name: vboxnet0

Normally, if you have all these settings, it should work ok, but it didn’t for me. So I moved to step 2.

Step 2. As indicated by Genymotion, start VirtualBox, go to menu File/Preferences menu, go to Network section, select Host-only Networks tab and delete the defined adapters.

Start your VM in Genymotion. Genymotion will recreate the adapter with proper settings (as described in step 1)

Normally, if step 1 didn’t work for you, step 2 should work ok, but it didn’t for me. So I moved to step 3.

Step 3. Delete and recreate the Android VM in Genymotion (VirtualBox host-only network settings I left as described in step 1).

http://wizti.com/blog/genymotion-emulator/

error when build:

https://developer.appcelerator.com/question/157016/titanium-build—-error-spawn-enoent

windows software locations:

http://docs.appcelerator.com/titanium/3.0/#!/guide/Software_Locations_and_Environment_Variables-section-29004844_SoftwareLocationsandEnvironmentVariables-WindowsSoftwareLocations