0
votes

I updated Phonegap from 3.0.0 to 3.3.0 as well as Cordova.

After that I updated my project by:

cordova platform update android
-> android updated to 3.3.0

Now I can't start my project anymore. Every Plugin-File has lots of errors.

Do I have to update the plugins as well, and how do I do that?

Edit.:

The library folder where cordova-3.0.0.jar used to be located is empty after the update. The Main-Src-Class can't extend neither DroidGap nor CordovaActivity.

If I put the old cordova-3.0.0.ja into the library-folder, my updated android project works again. I searched my project folder for a cordova-x.x.x.jar, but there is no library :(

Edit2:

I created a new Project and put my js-project (www-content) into the projcet www - folder. Now I can run this project from the console by phonegap run android. But if I open the android project with eclipse/android studio I can't launch the app due to this errors:

enter image description here

Edit: To update the plugins I remove the platform I'm developing for and add it again. This makes sure to have the plugins added to your project you have in your plugin-list. Changing a plugin always make sure to remove and re add the platform.

2

2 Answers

1
votes

I updated my project to phonegap 3.3 without any problem with plugins.

Do you have errors with plugins from phonegap or additional plugins? It it is only with additional plugins, maybe they are using some deprecated functions? (I don't there are but who knows?)

You can try to remove all the plugins and re-install them :

  • use phonegap local plugin list to get the ids of all the installed plugins
  • for each plugin use phonegap local plugin remove followed with the id and then reinstall using phonegap local plugin add followed with the git repository of the plugin
0
votes

Actually you're right, there is no more cordova jar.

My upgraded project continued to work because it still had (maybe because I forgot to launch phonegap platform update android ?) cordova3.1.0.jar in the libs foldfer.

I deleted the cordova3.1.0.jar and had the same errors as you.

In the platforms/android folder, there is now a second project named yourprojectname-CordovaLib

I imported this project in eclipse and added it to the java build path of the app project and now everything seems to be back to normal.

Edit for future upgrades from phonegap 3.1 to 3.3:

I restored my project in the state it was before the upgrade, launched phonegap platform update android and cordova.3.1.0.jar was still present in libs and in .classpath

I manually deleted it and removed reference in .classpath

Then I tried to import the CordovaLib project in eclipse but it was nammed null-CordovaLib instead of projectname-CordovaLib, I edited the file platforms/android/CordovaLib/.project to correct the name and then imported the project in eclipse.

It's not needed to change the java build path, the CordovaLib project is already referenced in the application project (in the Android Dependencies).