

Now we have a debug version of our game APK ready for testing. This prepares a debug APK which can be found at /platforms/android/build/outputs/apk/android-debug.apk Now in Node.js command prompt, go to the folder where ZIP file was extracted and then run following commands cordova platform add android Save zip file to some location and extract it to a folder. This will prompt you to save a zip file which is what we need for compiling our game to APK. For this we need to export a build package of our game from Intel XDK which can be done by going to Build tab -> Select target platform (in our case Android) and then click “Create Package” If Node and CLI installation is done, we can start compiling our game for Android store. If not then you should see an error which should be resolved first. This should display a message as following if everything is correct.

If you see any error then run the following command to troubleshoot cordova requirements
#Intel xdk nw.js install#
Open Node.js Command Prompt and install Cordova CLI 6.x by running commandĬheck if everything is setup on your system correctly by running following commands in sequence > cordova create test.Prerequisites – Make sure you have Java SDK as well as Android SDK installed on your system. The build process using Cordova CLI is summarized below. For developers looking for more control over build process and no money can go for Cordova CLI build process which is quite straight-forward and can be easily managed. There is one private app free with the service. PhoneGap Build is similar to “now defunct” Intel XDK cloud based build system which does need any installation on developer system but is a paid service. In order to create an APK we need to first export a build package from Intel XDK and then compile that build package using PhoneGap build or Cordova CLI. For that simply go to “Simulate” tab and select a device from list of simulators and then click on “Start Simulator” icon. We can run this code in the simulator to make sure everything works fine.

We only added the game code to the index.html (as highlighted) and have not removed anything else yet for now. * following two viewport lines are equivalent to meta viewport statement above, and is needed for Windows */ The default index.html code from the template looks like the following We are going to use Dice Roller example code from previous article and compile it as Android app.Ī project is created with default index.html Select “HTML5 + Cordova” and Click “Continue” which open a dialog box for specifying Project Name and Directory. We are going to look at steps to compile HTML5 game for Android in this tutorial.Ĭreate a new project using Blank HTML5 + Cordova template.
