开发者

How to add a non-Android Java package to the Android development environment?

So far I have been开发者_运维百科 using in tutorials, examples and sample code only packages that came pre-installed with the Android SDK.

Now, I want to add a non-Android package (e.g. Jsoup).

What's the proper way of doing that (so that it becomes available to all projects)?


You can add it to a project by right clicking on your project in Eclipse and choose Build Path and Add External Archive. Select the jar to add it to your build path and it will be included in any apk you create.

One caveat is that if the jar may use part of the JDK that doesn't exist in Android.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜