Search code examples
androidgoogle-pluspicasa

Android : VerifyError from using picasaWebService from google


I made thing simple to use a PicasaWebService to load a list of user albums

 PicasawebService myService = new PicasawebService("VideoAlbum");
                myService.setUserCredentials("email@blah", "password");

                URL feedUrl = new URL("https://picasaweb.google.com/data/feed/api/user/email@blah?kind=album");
                //URL feedUrl = new URL(String.format("https://picasaweb.google.com/data/feed/api/user/%1$s?kind=album&access=all&token=%2$s", Plus.AccountApi.getAccountName(client), token));

                UserFeed myUserFeed = myService.getFeed(feedUrl, UserFeed.class);
                Log.w("PICASSO", "C " + myUserFeed.getAlbumEntries().size() );
                for (AlbumEntry myAlbum : myUserFeed.getAlbumEntries()) {
                    System.out.println("PICASA ALBUM "+ myAlbum.getTitle().getPlainText());
                }

When one the code I received,

11-27 16:21:16.975: E/AndroidRuntime(7077): FATAL EXCEPTION: Thread-122693 11-27 16:21:16.975: E/AndroidRuntime(7077): java.lang.VerifyError: com/google/gdata/client/media/MediaService 11-27 16:21:16.975: E/AndroidRuntime(7077): at com.innovative.fragment.PicassaFragment$1.run(PicassaFragment.java:79)

What does the error mean....


Solution

  • The GData API client libraries are not made explicitly for Android so you need to take care of a few problems. If you get the VerifyError, then you are missing the following libraries of the JavaMail port for the Android platform in your build path:

    • activation.jar
    • additional.jar
    • mail.jar

    You can download these libraries from the JavaMail port website and then you will no longer have this compile time exception.