大厦的Andr​​oid库项目使用Jsoup库 [英] Building Android Library Project Using Jsoup Library

查看:248
本文介绍了大厦的Andr​​oid库项目使用Jsoup库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android的库项目(比如 SampleLibProject 产生于斌一个罐子为 samplelibproject.jar )的使用Jsoup图书馆阅读从 的href 属性标记。
而在我的Andr​​oid应用程序,如果我添加使用库引用(项目属性 - > Android和浏览库项目)应用工程确定没有因为我不要求我的Andr​​oid应用

I have a android library project(say SampleLibProject which generates a jar in bin as samplelibproject.jar) which uses Jsoup library to read href attribute from a tag. And In my android App, If I add reference of library using (Project Properties -> Android and browsing library project) App works OK without any issue as I dont require to copy Jsoup in my Android app libs.

但是,如果我在 Android应用程序的库添加 samplelibproject.jar 无Jsoup库我得到一个<异常code> java.lang.NoClassDefFoundError的:org.jsoup.Jsoup

But If I add samplelibproject.jar in libs of Android App without Jsoup library I get an Exception that java.lang.NoClassDefFoundError: org.jsoup.Jsoup.

所以我的问题是如何建立这样SampleLibProject会有没有必要在Android应用程序添加Jsoup罐子?

So my question is how can I build SampleLibProject so that there will be no need of adding Jsoup jar in Android App?

由于我不打算分发LibProject来源(我只会给 samplelibproject.jar 来的客户),并且不希望强迫他们包括jsoup库有Android项目。

As I am not going to distribute sources of LibProject (I will just give samplelibproject.jar to clients ) and don't want to force them to include jsoup library in there android project.

先谢谢了。

推荐答案

添加 Jsoup 在我的 libproject 解决源我的问题(ATLEAST用于暂时)。

Adding Jsoup sources in my libproject solved my problem(Atleast for time being).

@ gllowmas,@ jucas感谢您的建议,但。

@gllowmas,@jucas Thanks for the suggestions though.

这篇关于大厦的Andr​​oid库项目使用Jsoup库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆