0 Replies Latest reply on Jan 31, 2018 1:52 PM by mauricet40311126

    Phongap Bulid App´s Javascript won´t work


      Hello there!


      I have create an app via Phonegap.

      In the Browser and the Emulator on the Device, everything is working fine!

      When i Bulid the App and install it on the Device the Script won´t work anymore. Not all Script but the Classes.


      The Code see like this:


      index.html =========================================

      <script type="text/javascript" src="cordova.js"></script>

      <script type="text/javascript" src="js/iscroll.js"></script>

      <script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>

      <script type="text/javascript" src="js/jquery.mobile-1.4.5.min.js"></script>

      <script type="text/javascript" src="js/es6-promise.js"></script>             <<<<------

      <script type="text/javascript" src="js/es6-promise.auto.js"></script>     <<<<----- Try it but don´t help

      <script type="text/javascript" src="js/global.js"></script>

      <script type="text/javascript" src="js/main.js"></script>

      <script type="text/javascript" src="js/index.js"></script>

      <script type="text/javascript">




      index.js ==========================================

      var app = {

          // Application Constructor

          initialize: function() {



          // Bind Event Listeners


          // Bind any events that are required on startup. Common events are:

          // 'load', 'deviceready', 'offline', and 'online'.

          bindEvents: function() {

              document.addEventListener('deviceready', this.onDeviceReady, false);


          // deviceready Event Handler


          // The scope of 'this' is the event. In order to call the 'receivedEvent'

          // function, we must explicitly call 'app.receivedEvent(...);'

          onDeviceReady: function() {



          // Update DOM on a Received Event

          receivedEvent: function(id) {


      alert('test');              <<<<----------------- running!

      let eventListener = new main();      <<<<<<----- don´t running




      main.js ======================================

      class main extends global {


      /* .....................realy lot of Code...................... */


      constructor(elem) {

      super(); // Call global Class

      /* ............a lot of Code........... */


      alert('main Class loadet');

      console.log('main Class Loadet');


      } // end constructor


      } // end class


      I already try to add .jshintrc files to the main folder of the App and the www folder too.



        "esversion": 6


      But don´t help.


      Hope i find help here. Already try to fix it for many hours...

      Looking forward to hear from you.


      Many thanks