How to package apk files locally by yourself using Cordova

2

Index

Stats

6,387 visits, 13,936 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 12 Feb, 2017. Last updated 19 Feb, 2019

**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

Step 1:

Install the Java development kit (Java SE Development Kit 8u121)

Step 2:

Install Android Studio

Step 3:

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

Step 4:

Install NodeJS

Step 5:

Restart your computer

Step 6:

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

Step 7:

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.

Step 8:

Switch to the directory by typing: cd CordovaProject

Since we're targeting Android, type in: cordova platform add android

Step 9:

Export your C2 project to a new folder:

Step 10:

Delete contents of the folder CordovaProject/www/

Copy the contents of your C2 project (index.html,c2runtime.js, etc...) to that folder.

Step 11:

Open CordovaProject/config.xml and paste replace the its content with this :

  • 0 Comments

Want to leave a comment? Login or Register an account!