Jaya Vishwakarma
Jaya Vishwakarma

Reputation: 1332

Phonegap (Cordova): Application not working after adding jquery mobile js

I am new to phonegap and just trying to create a simple application using jquery mobile (http://nativedroid.godesign.ch). I was playing with jquery mobile and it was working fine but now when I am trying to add jquery mobile js, application is not working just showing a black screen and when I remove JQM js, application again works fine. I checked in browser where application is working.I added splash screen which is showing up but after that black screen in emulator. Tried with CDN url for jquery and jquery mobile but no effect.

I found similar question here but with no answer Jquery Mobile Not working with Phonegap/Cordova.

I am using this following simple code:

<!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8" />
        <meta name="format-detection" content="telephone=no" />
        <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script type="text/javascript" src="cordova.js"></script>        
        <!-- Jquery mobile -->
        <link rel="stylesheet" href="css/jquery.mobile-1.4.4.css" />
        <script src="js/jquery-1.11.1.js"></script>
        <script src="js/jquery.mobile-1.4.4.js"></script>
        <!-- Jquery mobile -->


        <title>Restaurant Name</title>
    </head>
    <body>
        <!-- Start of first page -->
        <div data-role="page" id="page1">

            <div data-role="header" data-position="fixed">
                <h1>Food Zone</h1>
            </div><!-- /header -->


            <div data-role="footer">
                <h4>Page Footer</h4>
            </div><!-- /footer -->
        </div><!-- /page -->
    </body>
    </html>

Please help me with this.I am stuck with this and can't moving further. Please let me know how I can debug this issue because my old applications are working where I used JQM. Any help will be appreciated. I am using all latest version, cordova CLI and trying with android platform for start.

Thanks Jaya

Upvotes: 0

Views: 581

Answers (2)

rakeshyadvanshi
rakeshyadvanshi

Reputation: 293

Vishwakarma, for debugging js error, use chrome remote debugging, and if there is any native problem, that can be troubleshot by android logger provided with android sdk

Upvotes: 0

user2020721
user2020721

Reputation:

Sometimes it does not work on emulator but should work on device. Try to change the emulator and check.

Upvotes: 1

Related Questions