3 Replies Latest reply on Sep 5, 2016 9:10 AM by kerrishotts

    phonegap doesnt run any javascript/jquery on android phone

    euricoc90210179 Level 1

      Hi I am running phonegap with eclipse a simple javascript alert pop up works on the browser but doesnt work on mobile phone

       

      this is the javascript i am running

       

       

      Do I need to config anything else to run simple javascript?

        • 1. Re: phonegap doesnt run any javascript/jquery on android phone
          VectorP Level 4

          You're probably not "running Phonegap", your script doesn't show and you don't descripe how it "doesn't work". Hard to help, this way. Can you be more specific?

          • 2. Re: phonegap doesnt run any javascript/jquery on android phone
            euricoc90210179 Level 1

            Hi I had the javascript here dont know how it didnt display, its just a simple alert box, i´ve downloaded all phonegap script and added to eclipse project, the phonegap works fine when its outside eclipse but when I had on eclipse none of the javascript work, here an example of a javascript i added

            Tryit Editor v3.0

             

            Do I need to configure anything on eclipse to work with eclipse funny thing is that the jquerymobile functions work, but stand alone jquery function or javascript functions doesnt work?

            • 3. Re: phonegap doesnt run any javascript/jquery on android phone
              kerrishotts Adobe Community Professional

              What version of PhoneGap CLI are you using? Is there any reason you're using Eclipse? For native Android development, you should use Android Studio instead. For Cordova, you can use any text editor you like (I like VSCode, WebStorm, Brackets, Atom, etc.). In that case Eclipse is fine if that's your preference, but I want to make sure you aren't running a very out-dated version of PG.

               

              Also, how are you running your app on the mobile phone? Include all the steps you're using to build and deploy the app to the mobile device. Then, check the mobile device's logs to see if you're getting any errors (you can use Chrome to see the JavaScript console, or adb logcat to see the device logs).