Mobile Zone is brought to you in partnership with:

Raymond Camden is a developer evangelist for Adobe. His work focuses on web standards, mobile development and Cold Fusion. He's a published author and presents at conferences and user groups on a variety of topics. He is the happily married proud father of three kids and is somewhat of a Star Wars nut. Raymond can be reached via his blog at www.raymondcamden.com or via email at raymondcamden@gmail.com Raymond is a DZone MVB and is not an employee of DZone and has posted 243 posts at DZone. You can read more from them at their website. View Full User Profile

Two More Windows Phone/PhoneGap Tips

08.22.2013
| 1109 views |
  • submit to reddit

Please note the date of this posting (Aug 21, 2013), what you are seeing here should be fixed rather soon and is probably not an issue by the time you're read this. I ran into this last week and wanted to blog it in case others hit the same hurdles.

First Issue: When you create a new application via the PhoneGap CLI, the default ID includes the word "hello-word". If you then try to build for Windows Phone you will get:

C:\Users\labuser\Desktop\pg3test\test2\platforms\wp8\App.xaml(1,1,1,1): error : x:Class="com.phonegap.hello-world.App" is not valid. 'com.phonegap.hello-world.App' is not a valid fully qualified class name.

This has already been reported (and fixed), but if you run into this, just add the --id attribute: phonegap create pathtoapp --id "com.camden.helloworld"

Second Issue: If you run your app on the Windows Phone and notice that the deviceready event doesn't fire (the default PG app uses a pretty animation to let you know when this occurs), then the issue is that the index.html is loading phonegap.js. Change the script src to cordova.js and all will be well.


Published at DZone with permission of Raymond Camden, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)