title: Cordova - JS - Build doesn't seem to work after changing the JS file
body: <p>I am using cordova 6.2.0</p>
  
  <p>Targeted platform is Android, SDK API Level: 15 - 19, </p>
  
  <p>Here's the code for index.js file</p>
  
  <pre class="lang-js prettyprint-override"><code>var app = {
  initialize: function() {
      this.bindEvents();
  },
  
  bindEvents: function() {
      document.addEventListener('deviceready', this.onDeviceReady, false);
  },
  
  onDeviceReady: function() {
      app.receivedEvent('deviceready');
  
  },
  // Update DOM on a Received Event
  receivedEvent: function(id) {
      var parentElement = document.getElementById(id);
      var listeningElement = parentElement.querySelector('.listening');
      var receivedElement = parentElement.querySelector('.received');
  
      listeningElement.setAttribute('style', 'display:none;');
      receivedElement.setAttribute('style', 'display:block;');
  
      console.log('Received Event: ' + id);
  }
  // var database = {
  //   var myDB = window.sqlitePlugin.openDatabase(
  //     {name: "mySQLite.db", location: 'default'});
  //
  //   myDB.transaction(function(transaction) {
  //     transaction.executeSql('CREATE TABLE IF NOT EXISTS phonegap_pro (id integer primary key, title text, desc text)', [],
  //     function(tx, result) {
  //       alert("Table created successfully");
  //     },
  //     function(error) {
  //       alert("Error occurred while creating the table.");
  //       });
  //   });
  //
  //   var title="sundaravel";
  //   var desc="phonegap freelancer";
  //   myDB.transaction(function(transaction) {
  //     var executeQuery = "INSERT INTO phonegap_pro (title, desc) VALUES (?,?)";
  //     transaction.executeSql(executeQuery, [title,desc],
  //     function(tx, result) {
  //       alert('Inserted');
  //     },
  //     function(error){
  //       alert('Error occurred');
  //     });
  //   });
  // }
  // database.initialize();
  };
  
  app.initialize();
  </code></pre>
  
  <p>Whenever I change the js file with the Commented code or any code the build is not working, always showing connecting to device and not doing anything.</p>
  
  <p><a href="http://i.stack.imgur.com/jhkDZ.png" rel="nofollow">Stuck there.</a></p>
  
  <p>I used the code from a tutorial, link: <a href="http://phonegappro.com/tutorials/phonegap-sqlite-tutorial-with-example-apache-cordova/" rel="nofollow">http://phonegappro.com/tutorials/phonegap-sqlite-tutorial-with-example-apache-cordova/</a></p>
  
  <p>Here's the index.html file as requested:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *"&gt;
          &lt;meta name="format-detection" content="telephone=no"&gt;
          &lt;meta name="msapplication-tap-highlight" content="no"&gt;
          &lt;meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"&gt;
          &lt;link rel="stylesheet" type="text/css" href="css/index.css"&gt;
          &lt;title&gt;Hello World&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div class="app"&gt;
              &lt;h1&gt;Apache Cordova&lt;/h1&gt;
              &lt;div id="deviceready" class="blink"&gt;
                  &lt;p class="event listening"&gt;Connecting to Device&lt;/p&gt;
                  &lt;p class="event received"&gt;Device is Ready&lt;/p&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;script type="text/javascript" src="cordova.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="js/index.js"&gt;&lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>PS: I am new to Cordova, please let me know If I am doing something wrong here.</p>