我试图在我的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所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)