**Today I'm gonna show you how to generate apk files without the need of an internet connection, and with only a simple click ! It will take you some time to setup all the installations below, so you better be patient because what you'll get to do at the end will be worth it!
Note: Make sure to run all installations as the Administrator.**
Requirements:
You will need for this tutorial:
- Java development kit
- Android Studio
- Android SDK Packages for Cordova
- NodeJS
Install the Java development kit (Java SE Development Kit 8u121)
Install Android Studio
Run Android Studio (It will take some time to prepare for its first run) and go to Tools > Android > SDK Manager.
Install the following packages :
Close Android Studio
Install NodeJS
Restart your computer
Create a new folder on your desktop named myCordovaExporter
Run the MS-DOS cmd
Type in : cd [your folder placement]
example: cd C:\Users\MyPC\Desktop\myCordovaExporter
Type in: npm install -g cordova
Now that we've installed everything, let's setup our project folder:
Type in : cordova create CordovaProject com.mystudio.mygame
Cordova will download some necessary packages, this process will take some time.
Switch to the directory by typing: cd CordovaProject
Since we're targeting Android, type in: cordova platform add android
Export your C2 project to a new folder:
Delete contents of the folder CordovaProject/www/
Copy the contents of your C2 project (index.html,c2runtime.js, etc...) to that folder.
Open CordovaProject/config.xml and paste replace the its content with this :