JavaScript objects not loaded without "-lc" parameter


I try to run my application on Android emulator and real device. When I run it with command “ionic run android -lc” it works like a charm! But when I run command without parameters “ionic run android” my application fires exceptions on JavaScript objects:

D/SystemWebChromeClient(7944): file:///android_asset/www/js/app.js: Line 14 : Uncaught ReferenceError: jQuery is not defined

Please tell me why there is a dependency on parameters “-lc”?

My environment is


<!DOCTYPE html>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">


    <link href="lib/ionic/css/ionic.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href="css/timeline.css" rel="stylesheet">

    <!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
    <link href="css/" rel="stylesheet">

    <!-- ionic/angularjs js -->
    <script src="lib/ionic/js/ionic.bundle.js"></script>

    <!-- cordova script (this will be a 404 during development) -->
    <script src="cordova.js"></script>

    <script src="//"></script>
    <!-- your app's js -->
    <script src="js/app.js"></script>
    <script src="js/controllers.js"></script>
    <script src="js/services.js"></script>    
    <script src="js/constants.js"></script>

  <body ng-app="starter" ng-controller="AppCtrl">

    <!-- Angular Material requires Angular.js Libraries -->
    <!-- <script src=""></script> -->
    <script src=""></script>
    <script src=""></script>
    <script src=""></script>

    <!-- Angular Material Library -->
    <script src=""></script>

    <ion-nav-bar class="bar-positive">

    <ion-nav-view class="background"></ion-nav-view>



angular.module('starter', ['ionic', 'ui.router', 'ngMaterial'])

.run(function($ionicPlatform) {
  $ionicPlatform.ready(function() {

  // A $( document ).ready() block.
  jQuery(document).ready(function() {
    console.log( "!!!!!!!!!!!!!!!!!!!!!!!!!! ready! !!!!!!!!!!!!!!!!!!!!!" );

    if(window.StatusBar) {


ionic info (project is ionic-v1):

Your system information:

Cordova CLI: 7.0.1 
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 3.16
Node Version: v7.4.0
Xcode version: Not installed

I have no idea at all, but this looked odd to me:

Tried with http://?

1 Like

Thanks, Sujan12! This helped! I fixed a little typo and now my application works! )))

1 Like