use Jersey Library in a Android project

六月ゝ 毕业季﹏ 提交于 2019-12-10 22:22:56

问题


I try to implement a restful client on android via Jersey library. It works pretty well in a Java project. But when I do it in a android project, always come up an exception: could not find class "com.sun.jersey.api.client.config...." It seems that the library cannot be found even I have added it in the build path.


回答1:


I believe Jersey currently is not ported to Android. But for example Restlet does explicitly support Android and also implements the same API (JAX-RS).




回答2:


The jar file needs to physically be located in the directory /libs in your project to be included into the distributed apk and linked to the app at runtime.



来源:https://stackoverflow.com/questions/6127997/use-jersey-library-in-a-android-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!