Android中的Gdata地图Api

Android中的Gdata地图Api,第1张

概述我试图在我的Android项目中实现gdatamapapi.但是我无法解决此错误"java.lang.VerifyError:com.google.gdata.client.media.MediaService"我正在使用实现gdataapi所需的所有库MapsServicemyService=newMapsService("createMap");erroriscomingduetothisline

我试图在我的Android项目中实现gdata map API.但是我无法解决此错误

"java.lang.VerifyError: com.Google.gdata.clIEnt.media.MediaService"

我正在使用实现gdata API所需的所有库

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

有任何线索..

thnx ..

我正在尝试以下代码

//

 **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's 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);  }

解决方法:

您必须在源代码中添加“ servlet.jar,activation.jar,mail.jar”

总结

以上是内存溢出为你收集整理的Android中的Gdata地图Api全部内容,希望文章能够帮你解决Android中的Gdata地图Api所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1069041.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存