Two more Windows Phone/PhoneGap Tips

This post is more than 2 years old.

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 at the time you're reading 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.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by S P Technolab posted on 8/27/2013 at 2:30 PM

Thanks for sharing this info with us..

Comment 2 by Maxime Robert posted on 9/4/2013 at 4:05 PM

Very useful !
But I'm surprised this isn't fixed yet, as well as the other bug pointed out in

Comment 3 by Raymond Camden posted on 9/4/2013 at 5:49 PM

Maxime: Yeah, I'm trying to track down when the next release will be. Will post when I know.