不能添加到库Android项目在Eclipse中 [英] Cannot Add Library to Android Project in Eclipse

查看:688
本文介绍了不能添加到库Android项目在Eclipse中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想一个库添加到Eclipse中现有的项目。我保持项目文件夹本身和库文件夹在我的桌面上标有文件夹的Android。当我尝试导入>现有code到工作空间>选择Android的..这被添加的是应用程序本身,而不是库中的唯一项目。我甚至尝试添加库自身,它会出现在进口名单上,但不会有打勾框和完成的选项。 我甚至右侧点击我的应用程序 - 属性> Android的>,发现图书馆有一个红色的X并没有让我寻找一个新的图书馆。我究竟做错了什么? 此相同的应用程序和库正与一个朋友,而不是我同样版本的Eclipse。

I am trying to add a Library to an existing project inside eclipse. I am keeping the Project Folder itself and the Library Folder in a folder marked "ANDROID" on my desktop. When I try to Import > Existing Code into Workspace > Select "ANDROID".. the only project that gets added is the App itself and NOT the library. I even try to add the library on its own and it will show up on the import list but will not have a "ticked box" with the option of "Finish". I even right clicked my App - Properties > Android > and noticed that the library is there with a red "X" and does not allow me to search for a new library. What am I doing wrong? This Identical App and library is working with the same version of eclipse for a friend and not me.

推荐答案

请确保库和项目都在同一个地方,即

Make sure that the libraries and the project are at the same place, i.e.

  1. 复制在同一个文件夹中的库为您的项目
  2. 导入库(文件>导入>现有项目的工作区)
  3. 开启属性> Android和选择是库
  4. 开启项目属性>安卓>添加(库)
  5. 选择库
  6. 保存属性
  1. Copy the libraries in the same folder as your project
  2. Import the libraries (file > Import > Existing Project in workspace)
  3. Open properties of library > Android and select Is Library
  4. Open project properties > Android > Add (library)
  5. Select the library
  6. save the properties

如果这不会为你工作,从lib文件夹复制的jar文件,并将其粘贴到项目库。但只应做,如果上面的方法不起作用

If this does not work for you copy the jar files from its lib folder and paste it in the projects lib. This should only be done if the above method doesn't work

这篇关于不能添加到库Android项目在Eclipse中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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