3 Replies Latest reply on Jul 15, 2017 12:17 PM by kerrishotts

    Error generating apk


      When testing my app in Phongap Developer runs the JavaScript well.

      But when I generate the Debug apk, I do not run the JavaScript and consequently I can not use the geolocation.

      Anyone know why?

        • 1. Re: Error generating apk
          kerrishotts Adobe Employee

          Things to double check:


          • Have you added the geolocation plugin to your app's config.xml
          • Have you sourced "cordova.js" in the HEAD of your index.html file?
          • Are you waiting for "deviceready" before attempting to use geolocation services?
          • Are you using Hydration? If so, disable it and rebuild after making changes to plugins and config.xml.
          • What OS and device(s) are you testing on? Do those devices have geolocation support?
          • 2. Re: Error generating apk
            andresaqp Level 1

            cordova.js on the tag Head

            framework7.min.js At the end of body


            How do I deviceready?


            I'm on windows and I'm testing for android, but phonegap is supposed to be for ios too


            The problem is that I have tried with simple javascript functions, like putting content in a div by pressing on a button and it does not work when I create the apk debug.

            But if it works when I use the Phonegap Developer app

            • 3. Re: Error generating apk
              kerrishotts Adobe Employee

              At this point we're going to need to see some code, I think. Link to a repo that has your config.xml, index.html, and javascript files so that we can take a look and see what's up. Scrub anything sensitive.


              As for deviceready, see Events - Apache Cordova