Random thoughts & observations

From the mundane to the profound and everything in between here’s what’s rocking our world

Solving Ionic Android App error with no Java files found which extend CordovaActivity

Posted: April 12, 2016
Written by: Saints At Play
Category: Ionic Framework

If you're developing an Android App using the Apache Cordova and Ionic Framework tools and encounter the following error:

Error: No Java files found which extend CordovaActivity

When trying to deploy your App to a connected device with the following command:

ionic run android

Then the solution might seem a little bit radical but, is in fact, quite quick and easy to implement...

More »

Resolving Ionic App invalid character entity warning on Android

Posted: April 7, 2016
Written by: Saints At Play
Category: Ionic Framework

Here's an interesting error we came across when publishing a recent App to an Android device:

Error happened [Error: Invalid character entity
Line: 4
Column: 56
Char:  ]
Error: Invalid character entity
Line: 4
Column: 56
Char:  
    at error (/usr/local/lib/node_modules/ionic/node_modules/xml2js/node_modules/sax/lib/sax.js:642:8)
    at strictFail (/usr/local/lib/node_modules/ionic/node_modules/xml2js/node_modules/sax/lib/sax.js:662:22)
    at Object.write (/usr/local/lib/node_modules/ionic/node_modules/xml2js/node_modules/sax/lib/sax.js:1336:11)
    at Parser.exports.Parser.Parser.parseString (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:403:31)
    at Parser.parseString (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:6:61)
    at Object.exports.parseString (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:433:19)
    at /usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/config-xml.js:23:12
    at /usr/local/lib/node_modules/ionic/node_modules/ionic-cordova-lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:76:16
    at fs.js:336:14
    at /usr/local/lib/node_modules/ionic/node_modules/ionic-cordova-lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:42:10

Yikes!

If you are currently encountering this error you will not believe how (thankfully) simple the solution to fixing this is...

More »

Removing the back button text in Ionic Framework Apps

Posted: December 27, 2015
Written by: Saints At Play
Category: Ionic Framework

There's no doubt that the Ionic Framework makes developing Mobile Apps easier to accomplish but as great as the framework is the documentation can sometimes be a little lacking.

This is especially true where it comes to figuring out how to hide the back button text in iOS Apps.

More »

Resolving iOS9 page transition issues with Ionic Framework Apps

Posted: November 18, 2015
Written by: Saints At Play
Category: Ionic Framework

If you've recently upgraded to iOS 9 you might find an issue with your Ionic Apps when testing/running on native devices.

We found that using the ui-router logic resulted in navigation issues where the requested page would 'flicker' or 'jerk' slightly into view before sliding back and then finally transitioning into full view.

Not a very pleasant user experience but thankfully the Angular team have rolled out a fix for this particular bug that we can implement in our Ionic Apps for now.

More »

Embedding YouTube Videos in Ionic Apps

Posted: October 12, 2015
Written by: Saints At Play
Category: Ionic Framework

In this article we're going to take you through embedding a YouTube video within an Ionic App.

We are going to assume that you have the following software installed on your system (we are using Mac OS X - so some screengrabs may differ to what you see on your own system):

It's also assumed that you have some familiarity developing with AngularJS too.

If you can tick all of the above then let's get started!

More »

Ionic framework attempt to unlock file that has not been locked error

Posted: March 14, 2015
Written by: Saints At Play
Category: Ionic Framework

Here's a frustrating issue we encountered when trying to update the ionic framework with the following command:

sudo npm update -g ionic

Instead of seeing a list of updated components being displayed in the console the following error occurred:

npm WARN locking Error: EACCES, open '/Users/nameHere/.npm/_locks/ionic-61c0cd50dc7a1457.lock'
npm WARN locking     at Error (native)
npm WARN locking  /Users/nameHere/.npm/_locks/ionic-61c0cd50dc7a1457.lock failed { [Error: EACCES, open '/Users/nameHere/.npm/_locks/ionic-61c0cd50dc7a1457.lock']
npm WARN locking   errno: -13,
npm WARN locking   code: 'EACCES',
npm WARN locking   path: '/Users/nameHere/.npm/_locks/ionic-61c0cd50dc7a1457.lock' }
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "update" "-g" "ionic"
npm ERR! node v0.12.0
npm ERR! npm  v2.7.1

npm ERR! Attempt to unlock /usr/local/lib/node_modules/ionic, which hasn't been locked

Not the most welcome of sights is it? Thankfully solving this turned out to be relatively quick and easy.

More »

Scrolling to a page anchor in Ionic Framework

Posted: February 17, 2015
Written by: Saints At Play
Category: Ionic Framework

If you've been working with the Ionic Framework you'll be familiar with setting up AngularJS routes for your controllers and view templates which are then triggered with hyperlinks used within your App. The combination of Ionic and AngularJS makes this easy to implement but when it comes to scrolling to a particular anchor inside a view template things get a little trickier.

More »

Resolving Android Emulator errors on Mac OS X when using Ionic Framework

Posted: December 9, 2014
Written by: Saints At Play
Category: Ionic Framework

Developing an Android App on Mac OS X? Using the Ionic framework from the command line to trigger the Android Emulator? Seeing the following error returned?

ERROR Unable to load VM from snapshot

Thankfully the fix for this error is quite simple...

More »

Resolving Android versionCode float type publishing error with PhoneGap

Posted: December 7, 2014
Written by: Saints At Play
Category: Ionic Framework

There you are ready to build your Android project - Cordova PhoneGap, Ionic Framework, Ant and the Android SDK are all successfully installed and configured correctly - you've opened up your command line and typed out the following instruction:

ionic build android

You press Enter and wait for the command to run only to be greeted with a failed build message akin to the following...

More »

Renaming Hello Cordova in an Ionic App

Posted: September 6, 2014
Written by: Saints At Play
Category: Ionic Framework

The Ionic Framework is a powerful and developer friendly framework for building Mobile Apps with Cordova PhoneGap. The combination of AngularJS and a component rich library makes development so much easier and faster.

The initial downside?

Every iOS App you create is called HelloCordova.

Here's how to change that...

More »

Latest Tweets