Note that there are some explanatory texts on larger screens.

plurals
  1. POPhoneGap Android application closes and The page at file://.. error
    text
    copied!<p>My application works fine in emulator, but when I put it on my Android device (Samsung Galaxy Spica) I get error: <code>The page at file:// says: gap:["Device","getDeviceInfo","Device0",true]</code></p> <pre><code>&lt;!DOCTYPE HTML&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;Title&lt;/title&gt; &lt;meta charset="utf-8"&gt; &lt;script type="text/javascript" src="javascript/phonegap.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; alert("test1"); &lt;/script&gt; &lt;link rel="stylesheet" href="css/style.css" /&gt; &lt;/head&gt; &lt;body onload="deviceReady()"&gt; &lt;script type="text/javascript"&gt; alert("test2"); function deviceReady() { alert("Ready"); } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I get all alerts. I found out that <code>document.addEventListener("deviceready", onDeviceReady, false);</code> is not working on android device. And there is another problem. When I click 'ok' or 'cancel' on <code>The page at file://...</code> error, application closes in 5 seconds. What seems to be the problem?</p> <p>*I use Dreamweaver CS5.5 to build application. Maybe there is a problem.. * and it's phonegap 1.0.0</p> <p>DEBUG:</p> <pre><code>D/PhoneGapLog( 8235): file:///android_asset/www/javascript/phonegap.js: Line 624 : Error: SyntaxError: Parse error I/Web Console( 8235): Error: SyntaxError: Parse error at file:///android_asset/www/javascript/phonegap.js:624 </code></pre> <p>---- This is when app closes ---- </p> <pre><code>I/WindowManager( 2163): WIN DEATH: Window{461efdd8 com.app.mobile/com.app.mobile.DefaultActivity paused=false} I/ActivityManager( 2163): Process com.app.mobile (pid 8235) has died. </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload