Ionic beta 14 gives JS error in android emulator


I upgraded the ionicframework to beta 14 for my app. After upgrading the framework I was required to do some minor fine tuning to my application as few things are updated in beta 14. It works fine in the browser, but when I try to run my app on the android emulator it gives following javascript error

01-11 00:00:21.593: D/CordovaLog(426): file:///android_asset/www/lib/js/ionic.bundle.js: Line 46718 : SyntaxError: Parse error

When is tried to look at line 46718 in ionic.bundle.js, I see following line

var headerBarEle = jqLite(’’).addClass($attrs.class).attr(‘align-title’, alignTitle);

Please help me to fix this issue.


I am facing the same issue while I create new ionic project. Even that do not run on emulator. I am very surprised to see that no one else got this issue and none responded on this.

I had the same error. not sure if this is correct but I think the issue comes from the addClass($attrs.class).
$attrs.class gives the parse error…
nt sure if correct but shouldn’t this be navBarClass?

Any idea when this issue will be fixed. Below is the screen shot for the same.

App runs fine when I run it via ionic emulate android, but I consistently gives above error when I try to run the app after importing it into eclipse.

Seems like this issue has been fixed in today’s release. Now I get error only when I try to run app on android 2.3, but works fine with android 4+.

i have problems on android 2.3 to.

Ran into this same problem myself. A little bit of research found this, showing that a similar problem was fixed back in Beta 2:

A search-and-replace of:




seems to have done the trick for me.

FYI, issue has been opened to get this fixed in the next version:

Have the same problem, js error:

02-05 16:22:26.445: D/CordovaLog(14066): file:///android_asset/www/js/libs/ionic/js/ionic.bundle.js: Line 23905 : Uncaught SyntaxError: Unexpected token finally

@luchus, it looks like Ionic made a few fixes for the finally() call to better support older devices. Doesn’t change the exact line your error is mentioning, but maybe give the latest Ionic a try and see if it fixes your problem too?