I Am upgrading my phonegap project(s) from phonegap 2.9.0 to the latest one, phonegap 3.3.0. Because it has a lot of big improvements.
It\'s about an android project
Well this page seems to explain it (I could only get to this answer by eclipse, the commandline interface (CLI) did never give me any warnings.
this error:
Could not find cordova.js script tag. Plugin loading may fail
lead me to:
https://github.com/phonegap/phonegap-cli/issues/134
and now it seems you have to change the code generated by phonegap create!!
<!-- <script type="text/javascript" src="phonegap.js"></script> -->
<script type="text/javascript" src="cordova.js"></script>
However... this does not help me, still the same error.
So I changed it back in to:
<script type="text/javascript" src="phonegap.js"></script>
I leave this answer, because for others this seemed to have worked (?)
Because it kept complaining about the classes not being found, I suspected this was about the plugin classes. So I removed them all and reisntalled them, now it's working.
Remove all plugins and reinstall them
phonegap plugin list
[phonegap] org.apache.cordova.camera
[phonegap] org.apache.cordova.console
[phonegap] org.apache.cordova.device
[phonegap] org.apache.cordova.device-motion
[phonegap] org.apache.cordova.device-orientation
[phonegap] org.apache.cordova.dialogs
[phonegap] org.apache.cordova.file
[phonegap] org.apache.cordova.file-transfer
[phonegap] org.apache.cordova.geolocation
[phonegap] org.apache.cordova.inappbrowser
[phonegap] org.apache.cordova.media
[phonegap] org.apache.cordova.media-capture
[phonegap] org.apache.cordova.network-information
[phonegap] org.apache.cordova.splashscreen
phonegap plugin help
for all installs I did this (I couldnot find a * to deinstall them all at once)
phonegap plugin remove org.apache.cordova.device
and after that I reinstalled them, so for all plugins:
phonegap plugin add org.apache.cordova.device
This did the trick for me....
Edit
By the way, a few days later I found out that in case you run things in eclipse. You should add 2 projects. One of the complete project (as a general project, not android). There you can edit the code in the blue print WWW folder. And after editing, you run the cli (command line interface) command: 'cordova build' and than you can run it from the second project (you add the platforms/android folder as a android project, using add from existing code).
By the way, after having resolved this issue... I tried whether a complete new checkout for my phonegap project works in a complete new and fresh folder.
And therfore I used a little bash file that did this: (to run after the git clone command in the folder you just cloned):
and frustrated got the same message again....
than I found a blog of one of the phonegap hero's: http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/
And one remark especially: he created a hook for installing the plugins... but the hook is:
after_platform_add`
which means my order was wrong.... after the checkout, no platform is added, this is done in:
phonegap run android after
So installing the plugins before the platform is added... seems not to work!
I inserted a command to build (which also adds the platform) before installing the plugin in my bash file, and now it works.
but even better: use the hook suggested by Holly Schinsky in the link above... this works for all platforms, and not just on ubuntu (my bash file).