- 33 Posts
- 0 Reply Likes
Posted 4 years ago
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
2. Don't use the old, deprecated plugins from the pgb repo. Instead, use the latest versions from npm. Be aware that they are named differently, mostly something like 'cordova-plugin-xxxx'
- 33 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 33 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
1. You are attempting to include plugins from the pgb repo, which don't exist under that name. Make sure you use npm as plugin source. In your case, the easiest way is to use the plugin element from the default namespace, not from the gap: namespace.
2. You should have both index.html and config.xml in the root ("/") of your zip file, not in some directory called /GCPC. In your case, it would be easiest to simply zip up the CONTENTS of that directory, not the directory itself.
3. If the above still doesn't solve the problem, you may have to isolate the issue by removing suspect parts for test purposes (like the WOW slider, or the script part that adds the iOS7 class)
4. The 'access origin' rule in your config won't be of any use without the whitelist plugin from npm. You need to include that plugin (cordova-plugin-whitelist) and apply its documentation.
Side note: I haven't seen any functionality that requires whitelisting, though.
- 33 Posts
- 0 Reply Likes
1. my config is now set up as per the instructions found on the Phonegap Blog post titled: config.xml gets an update - part 2 !!!!!!
by @brettrudd | 19 Nov 2015 | PhoneGap Build Blog
Plugins in config.xml are set up as such:
(all plugins are listed on the npm site)
according to the blog it states: source attribute, if present, will always be obeyed, but default to the npmjs.org repository. This attribute is ignored in the Cordova cli and npm will always be the default.
I had no errors when I changed the config to the above in phonegap build.
However, the app still does not load in Android. Is there is there something else I should be doing to make sure it is defaulting to npm?
2. I'm working on this
3. Haven't eliminated the above, yet.
4. Since you saw no functionality that requires white listing, should I delete the access origin rule?
New questions
I see a lot of info referencing android manifest xml - which I do not have. Does Phonegap Build provide that int he build?
Is phonegap.js sufficient or do I also need to inlcude cordova.js on html pages?
Phonegap Build states they are interchangeable.
Thanks

Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
No. This should do. You can always check at the plugins tab of your PGB app page.
2. I'm working on this
There is nothing to work on. Just zip up the contents of your main directory. It's the most likely cause of your trouble.
3. Haven't eliminated the above, yet.
Ah. %-/
4. Since you saw no functionality that requires white listing, should I delete the access origin rule?
I haven't checked your full app, because it's a large package. Maybe you do have some functionality that requires whitelisting. You should know, because you're the app's programmer.
I would leave it as is, and also add
<allow-navigation href="*" />
(You may want to restrict this to sources you retrieve code from)
N1. android manifest xml
You are apparently reading the wrong documentation. Developers who are using PGB don't include an androidManifest.xml or info.plist
It's generated by PGB.
N2. Is phonegap.js sufficient or do I also need to inlcude cordova.js on html pages? Phonegap Build states they are interchangeable.
You need eiher one.
Whatever Phonegap says, or other people claim, phonegap.js and cordova.js are NOT identical. The difference shows when you have multiple html files that have references to this file, of which some are in subdirectories. In such cases, only cordova.js will find the generated plugins.xml file. Phonegap.js won't find it.
I recommend to always reference cordova.js exclusively.
- 33 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 33 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 33 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 33 Posts
- 0 Reply Likes
I also posted the apk file if you wan't to try it out.
http://kjrwebdesigns.com/GCPC/GraceCo... (2).apk
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
2. If you correct that, and it still doesn't start, just make a very simple app (index.html with just a text 'Hello', nothing else) and retry. That way, you can check if it is something in your index or if the error is to be found somewhere else.
- 33 Posts
- 0 Reply Likes
- 33 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
I started removing items from the config file one by oneYour latest config was fine, so this step is not very useful.
I suggested you make a very simple HelloWorld index.html without all fancy scripts you have in your real index.html in order to see if the index is indeed where to look for the trouble.
Do you know what the major difference between the two versions...Well, PGB3.3.0 is old, doesn't pick up the new npm plugins, and it's insecure, so Google won't accept apps built with PGB3.3.0 anymore.
Trying PGB3.3.0 is really a waste of time.
It would probably be more useful to try cli-6.0.0 instead, especially if you are using the plugins from npm without setting the plugin version (defaulting to the latest version).
- 33 Posts
- 0 Reply Likes
Error - Some official plugins have to be updated if using PhoneGap >= 4.0.0. Please upgrade the version of any plugins that may include the following file: InAppBrowser.java - You can fix this here
As far as I know, I was using the most recent version of the plugins. Which was found on this page: https://www.npmjs.com/package/cordova...
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
If so, you might not have the latest version with
<plugin name="cordova-plugin-inappbrowser" spec="~1"/>
Before you do, please check at your app's page plugin tab if you have the inappbrowser plugin with status 1.3.0
- 33 Posts
- 0 Reply Likes
- 33 Posts
- 0 Reply Likes
- 33 Posts
- 0 Reply Likes
I have tried all of the suggested configurations from the phonegap blog:
I have also included the full version 1.3.0.
I am at a loss on this one. I have read the different boards on the subject and nothing works for this plugin.
Is there any insight on why an app would work fine on older version of PGB and not the newer ones? And why the inapp browser plugin doesn't work for Android?
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
I try not to break in when Petra has started to respond to a thread. Petra gets testy. I do too at times.
I can see part of you problem of your issue is you are using an outdate boilerplate or template. This have given you the wrong reference. Unfortunately, several people on this forum try to fix the that issue and not tell a person they have the wrong reference. In short, they assume the other person is as smart as them and has read the same things as them. I am guilty of the same bad judgement.
YOUR NEW START
Read the bold sentences in this FAQ. Then come back.
This FAQ should also help.
Top Mistakes by Developers new to Cordova/Phonegap
Jesse
- 33 Posts
- 0 Reply Likes
I'm not sure what you mean by outdated boilerplate or template as I have not downloaded and had not visited the link in the FAQ to them on github. Does this refer to the config.xml file? Again, I used the instructions on the Adobe Phonegap Build site and the Blog with the new config.xml instructions. Please clarify- template/boilerplate.
- 33 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
1.
<link rel="stylesheet" type="text/css" href="themes/GCPC-new.min.css"> is coded twice
2.
<link href="gracetheme.min.css" rel="stylesheet" type="text/css" >
File doesn't exist in your assets at the root
3.
<link href="GCPC2.min.css" rel="stylesheet" type="text/css" >
File doesn't exist in your assets at the root
4. After loading jQuery 1.8.3 first, you later load
<script type="text/javascript" src="engine1/jquery.js"></script>
which is jQuery 1.11.2
You can't have two jQuery versions loaded, and certainly not two versions that far apart.
- 33 Posts
- 0 Reply Likes
I did see that the style sheets were incorrectly directed - I moved them into a folder and Dreamweaver did not update the change. Don't know why.
Even with these problems corrected, builds using anything higher than 3.5.0 do not work on Android (downloads, installs, but on open it immediately gets the stopped error). I have not added back the inapp browser to the config file since I can't get it to work with the lower versions of pgb. So, in other words, the above is not the problem.
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
I do not have two jquery versions loaded - if you take a closer look - it is jquery and jquery.mobile - not the same.No. You have several jQM versions in your assets. Of them, you reference jQM1.4.5
However, you really use two versions of jQuery in your index.html. Take a closer look!
- 33 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
JesseMonroy650 (Volunteer), Champion
- 3325 Posts
- 122 Reply Likes
Yes, the website has quite a few templates. "Hello World" is one template. Often the new material gets mixed with the old material and it becomes confusing for people. There is no clear path through the documentation.
Another stumbling block for developers is that Phonegap alludes that "if you can build a webpage, you can build an app". That is not so true. It is true those skills are need and nececsary, but other factors come into play.
If you have ever created a website, then the process is similar - except there is no webserver. This means that files are only loaded from the webpage - there are no server services, perse. So think like a website and your index.html will load correctly.
On the config.xml, start with the least number of items you can, then add. This has two side effects. 1) it is easier to see things and fix things 2) you will add those things you removed later.
One note on config.xml - you can remove all references to icons and splash pages until you are ready. When you build, Phonegap will add it's own icons. This will allow you to develop without being distracted by why this thing (icons) is in the way.
Here is the boilerplate I show people. It builds without issues. Your are free to use it. The Tutorial is included:
An HTML Boilerplate for Phonegap
Lastly, my hope is that this will help you on your path to create your app.
FWIW: I've been guilty of "condescending tone".
Jesse
- 33 Posts
- 0 Reply Likes
I get no errors on build if I use the most recent version of PGB but the app immediately stops on Android. If I use the older version of PGB and remove the inappbrowser plugin the app works on Android devices. If I add the plugin back in I get the annoying Error - Some official plugins have to be updated if using PhoneGap >= 4.0.0. Please upgrade the version of any plugins that may include the following file: InAppBrowser.java - You can fix this here
Yes, I am using the most recent version. Yes, I have read the blogs and included the latest version from NPM. Same error. So, I can either have the build work and the app not or have the app work but the plugin not work. And there is no answer for why it works on older versions of PGB and not the new one. I have validated my config.xml file and it passes. The app is still fully functional on iOS devices no matter what version of pgb is used. Is it possible to clarify in config.xml to use one version of a plugin for android and another for iOS? Or only use it for iOS? This is not an ideal work around but at least the app would function to a point. FYI, I have already specified different pgb version in config.xml for iOS and Android.
Related Categories
-
PhoneGap Build
- 15111 Conversations
- 274 Followers


