mpsyp
mpsyp

Reputation: 482

Should i uninstall cordova and install phonegap if I want to use build.phonegap.com?

I started with Cordova 3.3.1-0.3.1 because I didn't know any better. Everything installed by npm, etc. Then i wasted much time trying to debug remotely using weinre, etc.

Moved onto build.phonegap.com, and linked my cordova git repo. Build seems to work fine, but debugging still not working. Slight progress in that the debugging client now connects to the target, but for some reason the app borks on the device:

Application Error There was a network error. (file:///android_asset/www/index.html)

Now every time I open the app on the device I get:

Cordova API specs bunch of links to tests none of which work.

One more note, Phonegap says my app is using an older version of Phonegap (2.9) and recommends upgrading to 3.0. I'm using Cordova 3.3. Should I uninstall cordova 3.3 and install phonegap? Any issues to watch out for?

Thanks.

Upvotes: 1

Views: 354

Answers (2)

viciouskinid
viciouskinid

Reputation: 59

I got this error because I zipped up the whole project folder. I tried again with just www folder zipped and it worked.

Upvotes: 0

QuickFix
QuickFix

Reputation: 11721

You don't need to uninstall cordova to install phonegap, you can have both on your system.

If you created a project using cordova and want to use it in phonegap build, you have to modify the namespace in config.xml to have the phonegap specific parameters work. (for example gap:plugin for the plugins).

use <widget id="com.app.package" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0"> instead of <widget id="com.app.package" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

and in index.html, include phonegap.js instead of cordova.js.

About the error you have, I've seen that when the loading of index.html goes into a timeout.

It can be a javascript taking too long or you checked debug in phonegap build but the device can't access the weinre server before the timeout.

Upvotes: 2

Related Questions