Gdata Api map in android

I am trying to implement gdata map api in my android project. But I can not solve this error.

"java.lang.VerifyError: com.google.gdata.client.media.MediaService"

I use all the libraries needed to implement gdata apis

MapsService myService = new MapsService("createMap"); error is coming due to this line

is there any key.

Thnx ..

I am trying to execute the following code

//

 **MapsService myService = new MapsService("createMap");**

try {
     // Replace username and password with your authentication credentials
      myService.setUserCredentials("username","password");
      createMap(myService);
    } catch(AuthenticationException e) {
      System.out.println("Authentication Exception");
    } catch(ServiceException e) {
      System.out.println("Service Exception: " + e.getMessage());
    } catch(IOException e) {
      System.out.println("I/O Exception");
    }
  }

  public static MapEntry createMap(MapsService myService)
    throws ServiceException, IOException {

    // Replace the following URL with your metafeed POST (Edit) URL
 // Replace userID with appropriate values for your map
    final URL editUrl = new URL("http://maps.google.com/maps/feeds/maps/userID/full");
    MapFeed resultFeed = myService.getFeed(editUrl, MapFeed.class);
    URL mapUrl = new URL(resultFeed.getEntryPostLink().getHref());

    // Create a MapEntry object
    MapEntry myEntry = new MapEntry();
    myEntry.setTitle(new PlainTextConstruct("Demo Map"));
    myEntry.setSummary(new PlainTextConstruct("Summary"));
    myEntry.getAuthors().add(new Person("My Name", null, "username"));

    return myService.insert(mapUrl, myEntry);
  }
+3
source share
1 answer

You need to add "servlet.jar, activation.jar, mail.jar" in the source code

+3
source

Source: https://habr.com/ru/post/1771874/


All Articles