Packaging the app using Cordova CLI

As mentioned previously, Phonegap Build has a app size limit of 50mb for a free user. To try to get under this limit, I reduced all the quality of my audio files. However, the quality was very poor.

I spoke to Daniel about this problem and he said using Phonegap or Cordova’s Command Line Interface (CLI) will combat the issue as there is no file size limit. It’s just a little harder to do than Phonegap Build, which basically does it all for you.

I tried out both Phonegap CLI and Cordova CLI and Cordova seemed to work better for me. I didn’t really know what to do, so I followed the Cordova docs as well as watching a very helpful YouTube video.

Firstly, I had to download Node.js, a server side JavaScript environment. I also had to download Android Studio & Java Development Kit, and create Environment Variables for these.

node

android studiojdk
Through Command Prompt, I installed Cordova and created a Cordova project. Since I developed for Android, I had to install that platform on Cordova.
Once my project was created, I added all of my files into the www folder, edited the config.xml file and started a build of the app through Command Prompt.

installcreate-cordovacmndcmdconfig

I ran into issues with my JDK that wouldn’t allow me to build the app. After some searching online, I found a solution, tried to build again and it was successful.

It went surprisingly a lot smoother than I had first expected. I think I prefer this way of building the APK as I am doing it myself, so I am learning more, and I have more control over the file sizes.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s