Windows host setup
These instructions have been tested on Windows 7 Enterprise, 64 bit.
These steps will enable you to develop Crosswalk applications to run on Android:
- Install Python
- Install the Oracle Java Development Kit (JDK)
- Install Ant
- Configure the tools
- Install the Android SDK
- Download the Crosswalk Android app template
- Verify your environment
Install Python
- Download Python: http://www.python.org/downloads/
- When the installer starts, choose Install for all users. For this example, we set
C:\python-3.4.3as the installation directory (any location is fine).
Install the Oracle JDK
- Download the Oracle JDK: http://www.oracle.com/technetwork/java/javase/downloads/ (Java 7 and 8 are known to work)
- Once downloaded, run the Java
.exeinstaller. For this example, we setC:\jdk-1.8.0_40as the installation directory (any location is fine).
Install Ant
- Download the Apache Ant build tool: http://www.apache.org/dist/ant/binaries/ (Version 1.9.3 is known to work)
- Unzip the contents where you want them. For this example, we put the folder in
C:\ant-1.9.4(any location is fine).
Configure the tools
The next step is to set up your environment so that binaries and scripts which were installed manually are in your Path (Python, Java, and Ant).
Edit environment variables for your account. In the Windows Start menu, search for "Environment variables". Alternatively, click on the System icon in the Control Panel; then go to Advanced system settings and click the Environment Variables button. You should see this dialog box:

Edit the Path environment variable as follows:
Select the Path environment variable (in the top select box, User variables...). If it does not exist, add it.
Click Edit.
In the Variable value field, add the path to the executable for each of the installed tools, separated with ";". For this example, we added the following at the end of the Path variable:
;c:\python-3.4.3;c:\ant-1.9.4\bin;c:\jdk-1.8.0_40\binClick OK.
The same task can be done on the command-line (note the quotes ""):
> setx path "%path%;c:\python-3.4.3;c:\ant-1.9.4\bin;c:\jdk-1.8.0_40\bin"
To ensure that Ant is using the correct version of Java (the one you just installed), set the JAVA_HOME environment variable to the location of the JDK:
Click the New button just under the top select box (User variables...).
Set Variable name to JAVA_HOME.
Set Variable value to
. For our example, c:\jdk-1.8.0_40. Click OK.
Install the Android SDK
- Download Android Studio from http://developer.android.com/sdk/index.html.
Run the installer. Remember the installation directory you select for the next step.
Add the Android SDK directories to your
PATHeither through the Environment Variables dialog or from the command-line.> setx path "%path%;<path to Android SDK>" > setx path "%path%;<path to Android SDK>\sdk\tools" > setx path "%path%;<path to Android SDK>\sdk\platform-tools"The
toolsandplatform-toolsdirectories may be in slightly different locations, depending on how you installed the SDK. Amend the above paths appropriately.Run the SDK Manager, either from inside Android Studio or from the command-line:
> "SDK Manager.exe"In the SDK Manager window, install the Platform tools, Build tools, and SDK Platform for the version(s) you are interested in:
[ ] Tools [x] Android SDK Platform-tools <version> [x] Android SDK Build tools <version> [ ] Android <version> (API <version>) [x] SDK Platform
Download the Crosswalk Android app template
The Crosswalk Android distribution contains an application template which can be used as a wrapper for an HTML5 application. It also includes a script which will convert a wrapped HTML5 application into an installable Android apk file.
To get Crosswalk Android:
Download the version you want from the Downloads page. We suggest that you use the stable Android version (${XWALK-STABLE-ANDROID-X86}).
Unzip it. You should now have a
crosswalk-${XWALK-STABLE-ANDROID-X86}directory.
Verify your environment
Check that you have installed the tools properly by running these commands:
> java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
> ant -version
Apache Ant(TM) version 1.9.3 compiled on December 23 2013
> python --version
Python 2.7.6
> adb help
Android Debug Bridge version 1.0.31
Congratulations, your system is ready for Android development with Crosswalk.
Now the host is setup, you can prepare your targets.
English
