I am trying to do Hello World (for Android only) at https://build.phonegap.com/apps/.
I created a directory. Named it www. Added the following index.html. Zipped it. Then uploaded it to https://build.phonegap.com/apps/ hoping to get back an .apk file.
index.html<!doctype html>
<html>
<head>
<title>PG Test</title>
</head>
<body> Hello World </body>
</html>
Instead, all I got was this error message.
ErrorError - 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:
FileTransfer.java - You can fix this here.
The "here" link in the above error message takes you here: http://plugins.cordova.io/npm/index.html. Where it says "Page not found."
Question
Please supply the necessary source code for Phone Gap Build to generate an .apk file for Android.
This Youtube video shows how to install and use PhoneGap Build using a sample application. https://www.youtube.com/watch?v=UOjoNEUFeVE
Here is the Github repository of the source code. https://github.com/ccoenraets/EmployeeDirectory
It works!
I think I will go in a different direction entirely by using the cca (Chrome Cordova App) toolchain to develop Mobile Chrome Apps.
Here are some sample starter apps.
And here is a good Youtube video depicting the procedure.
Delete and restart instead of update code
My solution was to delete my existing app (instead of "update code"). Apparently, there was some "caching" of prior code that didn't get overwritten so I had to completely wipe the old .zip file and start over with a new one.
Then it worked.
Plugins are pulled in config.xml
After a little more tinkering, I might be starting to understand what's happening. I just downloaded the phonegap-start app from github.com/phonegap/phonegap-start and the same problem resurfaced. I think the problem is caused by the plugin source files referenced in the config.xml file. And I think these references were not deleted when I selected "update code" instead of deleting the old app and starting over. The relevant section of the config.xml file is below.
config.xml snippetFWIW: you have not mentioned anything about your
config.xml
. At this point I am assuming you are using the one you get - without modification.Okay. I'm going to give you the quick fix. But first you should know you have a large amount of errors. This quick fix will get you going, but you should read the document I've laid out more than once.
Top Mistakes by Developers new to Cordova/Phonegap
QUICK FIX Add this to your
config.xml
for PHONEGAP BUILD ONLY<preference name="phonegap-version" value="3.7.0" />
There are two large reasons you are getting these errors.
From #6 on the link above:
TO repeat, you are not lucky. You are getting the set of cascading error
You should read #6, #7, #10 & #11.
Best of Luck, let me know how it is going.
Try updating phonegap or any related programmes because one seems to be outdated. If your using any plugins like adding in your app try to see if their the latest version as well.