56 errors when upgrading to 2.7.0

266 views
Skip to first unread message

Michael SBCERA

unread,
May 24, 2013, 4:42:23 PM5/24/13
to phon...@googlegroups.com
I upgraded to 2.7.0 and none of my plugins work. I have a lot of "cordova cannot be resolved" errors, some "cordova cannot be resolved or is not a field" errors, some "plugin cannot be resolved to a type" errors, some "The import org.apache.cordova.api.Plugin cannot be resolved", and a few others.

I'm not sure what happened.

jcesarmobile

unread,
May 24, 2013, 5:44:43 PM5/24/13
to phon...@googlegroups.com
Which version did you have before?
There are phonegap upgradin guides and plugin updating guides

Michael SBCERA

unread,
May 24, 2013, 5:58:06 PM5/24/13
to phon...@googlegroups.com
The upgrade guides stop at 2.5. I have been upgrading since like 1.3 or something. Seems like there is always some new catch.

It seems like it has to do with the .java file of the plugins. I built a new 2.7.0 project and brought everything over. As soon as I add the src folder that has com/phonegap/plugins/........ I get the error. I also get an error with the plugin that is com/pushwoosh/plugin/pushnotifications so it is not the phonegap name in folder structure.

It looks like you have to change plugins to:
 
import org.apache.cordova.api.CordovaPlugin;
public class ChildBrowser extends CordovaPlugin

instead of:

import org.apache.cordova.api.Plugin;
public class ChildBrowser extends Plugin

but then I have error for:

this.success(result, this.browserCallbackId);

Michael SBCERA

unread,
May 24, 2013, 6:48:01 PM5/24/13
to phon...@googlegroups.com

Apparently all the plugins have to be updated again. So ChildBrowser doesn't work, Google Analytics doesn't work, etc. Fun stuff.

jcesarmobile

unread,
May 25, 2013, 3:41:45 AM5/25/13
to phon...@googlegroups.com
On 2.7 you have inAppBrowser built in, it's better than childbrowser

mictam

unread,
May 28, 2013, 2:57:33 PM5/28/13
to phon...@googlegroups.com
I disagree that it is better, but either way several plugins no longer work in 2.7. I made some edits to code, but still have problems.

Kim Ras

unread,
May 28, 2013, 4:13:21 PM5/28/13
to phon...@googlegroups.com
Hi I have similar issues..
My App works on 2.5 PhoneGap, but fails on storage reads, Json convert, local file reads, and more.. 

I am really interested in hearing comments. and experience.. 
I only use one Plugin that is not OOTB, and that is the Video plugin.. 

Thanks in advance
Kim

Kerri Shotts

unread,
May 28, 2013, 5:46:25 PM5/28/13
to phon...@googlegroups.com
Not enough information. Define "fails". What do you get in the logs? What platform(s) are you supporting? What OS version(s)?


___________________________________
Kerri Shotts
photoKandy Studios, LLC


Social Media:
          Twitter: @photokandy, http://twitter.com/photokandy
          Tumblr: http://photokandy.tumblr.com/
          Github: https://github.com/kerrishotts
                        https://github.com/organizations/photokandyStudios
          CoderWall: https://coderwall.com/kerrishotts

Apps on the Apple Store:

Books:

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Michael SBCERA

unread,
May 28, 2013, 7:15:28 PM5/28/13
to phon...@googlegroups.com
I posted some of the errors I originally ran across. For my situation it is a case of plugins not having been updated to reflect whatever changes happened in either 2.6 or 2.7. Everything worked fine until the upgrade. I have corrected a number of the errors in the plugins but still have two that are preventing me from running the emulator to see if the changes even worked. This is Android/Eclipse:

Description    Resource    Path    Location    Type
The method execute(String, JSONArray, String) of type GoogleAnalyticsTracker must override or implement a supertype method    GoogleAnalyticsTracker.java    /Project/src/com/phonegap/plugins/analytics    line 39    Java Problem
  
This is line 39: public PluginResult execute(String action, JSONArray data, String callbackId)

Description    Resource    Path    Location    Type
The method success(PluginResult, String) is undefined for the type ChildBrowser    ChildBrowser.java    /Project/src/com/phonegap/plugins/childBrowser    line 411    Java Problem

And this is line 411:             this.success(result, this.browserCallbackId);

As I said I'm not sure correcting these errors will fix the plugins though.

Kerri Shotts

unread,
May 28, 2013, 7:18:26 PM5/28/13
to phon...@googlegroups.com
I was referring to Kim Ras' email...



___________________________________
Kerri Shotts
photoKandy Studios, LLC



Social Media:
          Twitter: @photokandy, http://twitter.com/photokandy
          Tumblr: http://photokandy.tumblr.com/
          Github: https://github.com/kerrishotts
                        https://github.com/organizations/photokandyStudios
          CoderWall: https://coderwall.com/kerrishotts

Apps on the Apple Store:

Books:


Michael SBCERA

unread,
May 28, 2013, 7:21:22 PM5/28/13
to phon...@googlegroups.com
Ah. Any thoughts on the original issue or does it seem like the plugins just need to be upgraded?

Kim Ras

unread,
Jun 1, 2013, 5:43:21 PM6/1/13
to phon...@googlegroups.com
Hi,
It actually do not fail.. I found that it is because the FileReader returns a empty string.. and no errors.. It is on IOS and Android, and on local buils and on build.phonepag.com
ODD..
Thanks
Kim

jcesarmobile

unread,
Jun 1, 2013, 6:53:08 PM6/1/13
to phon...@googlegroups.com
To michael, yes, at least on iOS all the plugins need to be updated if they were using the deprecated syntax

Simon MacDonald

unread,
Jun 2, 2013, 8:18:16 PM6/2/13
to phonegap
This post should help you update your Java code. Lemme know if I
missed anything as I wrote it up pretty fast.

http://simonmacdonald.blogspot.ca/2013/06/why-dont-my-plugins-work-in-phonegap.html

Simon Mac Donald
http://hi.im/simonmacdonald


On Sat, Jun 1, 2013 at 6:53 PM, jcesarmobile <jcesar...@gmail.com> wrote:
> To michael, yes, at least on iOS all the plugins need to be updated if they were using the deprecated syntax
>
Reply all
Reply to author
Forward
0 new messages