1 person found this helpful
Sounds like you attempted to build in PGB with the "Phonegap directory structure". That would be wrong.
Phonegap Build doesn't require any specific directory structure or special directory names. In fact, it doesn't require any directories at all. The only requirement is: have both index.html and config.xml in the same directory.
The easiest way to do that: put them both in the root directory of your zip file. All other assets can either be in that same root or in any directory below that root, as you prefer.
Thanks for your feedback. But unfortunately the solution doesn't work properly. Though it solves some problem. But still stuck in same place.
But the user interface still remains the same (Blank). But now i have no error to rectify. So i have no clue right now how to fix this or where was the problem. Your help would be very much appreciable.
- Don't include libraries via CDN. This takes time to download, and you have no way of verifying a complete and non-corrupt copy. Download the files to your project and distribute them as part of the app bundle. This will load quickly but also ensures that if you are ever without network access (or have a bad network connection) that your app can still load the library.
- A blank page could also indicate a failure to load a library, like Chris mentioned above. This is usually also obvious in the JS console.
- It would help to see some code -- namely, config.xml, index.html, and the JS code responsible for startup. If you have any identifying information in those files that you don't want public, remove before posting. Or, if you are comfortable, share a link to your code or built app, and we can take a look.
I have to use CDN. Because the CDN i'm using is for google visualization. Below is the FAQ posted in developers.google.com that google visualization api cannot be downloaded and used.
I can share the build app for now. If you want more detail, then I can send you the code of my app. Please help me on this one.
As I mentioned above, there appears to be a problem with the directory structure of your package.
The posted apk doesn't help much. Could you please make your zip file available and post its url here?
Your APK indicates that you're uploading incorrectly -- there are two "www" directories, one nested in the other, like so:
Each "www" directory has different files; the first "www" looks like your app, and the second looks like a default PhoneGap app. I wouldn't expect PGB to pick the correct one, so you need to ensure you only upload your web assets, not the entire project nor additional "www" directories.
The APK should instead only have one "www" like so:
Also, based on the APK, there's a lot of plugins in there. This might be because PGB is seeing the wrong config.xml file OR you've left them in your config.xml. Remove any plugins your app doesn't need.
Hi Kerri shotts,
Sorry it's been few days I couldn't reply. I have been trying the whole day today using phone gap again. But still getting error for google api usage. Can you please send your mail address. I can send you my entire source code. Hope from there you can help me to build my app using phonegap build. Thanks in advance.
Some more thoughts:
- net::ERR_NAME_NOT_RESOLVED indicates a DNS lookup problem -- that is, no address was found for the corresponding domain. Make sure that your device is attached to a network that allows remote access and that there is a route to the hosts you're trying to contact.
- You're not waiting to load external resources until "deviceready" fires. Since the whitelist is in play, and it is a plugin, you can't do any network access until that plugin has finished initializing.
- I don't see a content-security-policy (CSP) meta tag in the index.html file. You should have one. See: GitHub - apache/cordova-plugin-whitelist: Mirror of Apache Cordova plugin whitelist
Even I cannot access the resources after the "deviceready" fires. Because I've created a sample application using phonegap desktop as given in - Step 3: Create Your App | PhoneGap Docs and debugged it using google chrome. I've attached the chrome debug screenshots of that sample app. As you can see from below, it throws the same resource loading error.
Also I tried to insert same google analytics api, which obviously also caused errors.
Also please help me to enable the zoom in feature for the phonegap app. I've have already tried to use viewport meta tag and referred lot's of forums. But couldn't able to solve. So, if you send the source code of the zoom feature of the basic app - Step 3: Create Your App | PhoneGap Docs would be helpful.
you should have a "www" folder inside your project folder and in "www" folder you should have the following:
css all your css files must be here
img all your pictures must be here
res your app icon must be here
index.html must not be in a folder