Adding a library/JAR to an Eclipse Android project

1.Download the library to your host development system.

   下载库到你的电脑里的文件夹中

2.Create a new folder, libs, in your Eclipse/Android project.

   在你的Eclipse软件上的Android项目下新建一个文件夹,名字为:libs(如果有就不需要新建,如果为lib改为libs即可)

3.Right-click libs and choose Import -> General -> File System, then Next, Browse in the filesystem to find the library's parent directory (i.e.: where you downloaded it to).

  右键点击libs文件并且选择(点击)Import选项,点开General选项,点击File System选项,点击Next,点击Browse,找到你下载下来的库的文件夹

4.Click OK, then click the directory name (not the checkbox) in the left pane, then check the relevant JAR in the right pane. This puts the library into your project (physically).

   选择你下载库的文件夹后点击OK,在下面左边的框中选择你要导入的库的文件夹,右边框中选中你要导入的库文件,点击finish即可导入库文件。

5.Right-click on your project, choose Build Path -> Configure Build Path, then click the Libraries tab, then Add JARs..., navigate to your new JAR in the libs directory and add it. (This, incidentally, is the moment at which your new JAR is converted for use on Android.)

  右键你的项目,选择Build Path,选择Configure Build Path,接着点击Libraries选项,点击Add JARs...,选择你的项目中的libs文件夹中的到入库,点击OK即可导入。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值