简体   繁体   English

无法将Android库添加到我的项目

[英]cannot add Android library to my project

I tried to add Android library to my project , in the first time I do this I see green arrow and when I open the project properties again I see 我试图将Android库添加到我的项目中,这是第一次,我看到绿色箭头,当我再次打开项目属性时,我看到 在此处输入图片说明

what is the problem ? 问题是什么 ?

将库作为一个Android项目打开,然后添加该项目。

假设您的日食工作区在E驱动器中,而导入的库项目在C驱动器中,则将该项目(导入库项目)复制到该E驱动器中,然后导入到您的工作区中。然后在您的项目中引用该库。

Just use English Character in your project and folder path names. 只需在项目和文件夹路径名中使用英文字符即可。

Good Luck :) 祝好运 :)

i was face the same problem. 我面临着同样的问题。 i think easy solution is at first create a folder on your hard disk and there you just copy your project and library project. 我认为简单的解决方案是首先在硬盘上创建一个文件夹,然后在其中复制项目和库项目。 then in eclipse add your library project and from properties make as library and then add your main project and try to same approach to add library as you mention before.then your library will add in your project 然后在eclipse中添加您的库项目,并从属性中将其作为库添加,然后添加您的主项目,并尝试使用与前面提到的相同的方法添加库。然后您的库将添加到您的项目中

if you're trying to add a .jar library into your project you can try do that 如果您要在项目中添加.jar库,则可以尝试这样做

  • Add the .jar file to libs folder on root of your project ( YourProject/libs ) .jar文件添加到项目根目录下的libs文件夹 (YourProject / libs)
  • if the .jar file has a .so file add the .so to libs/armeabi 如果.jar文件具有.so文件,请将.so添加到libs / armeabi
  • refresh the project in Eclipse 在Eclipse中刷新项目

The X appearing against the referenced library project also appears if the library project has a build error. 如果库项目有构建错误,也会出现在引用的库项目上出现的X。 This happened to me after updating ADT at some point. 在某些时候更新了ADT之后,这发生在我身上。 There was something in the newer version that must have performed extra validation, in my case it was a few strings in my French resource files that weren't defined. 在较新的版本中,有些东西必须执行额外的验证,就我而言,这是我的法语资源文件中的一些未定义的字符串。 I updated these and the X disappeared. 我更新了这些,X消失了。

I had a same problem. 我有同样的问题。 I have windows 8.1 我有Windows 8.1

It is impossible that the project and libraries physically lay on different disks 项目和库实际上不可能放在不同的磁盘上

My project lay on a disk C . 我的项目放在磁盘C上 Libraries lay on the D disk 库位于D盘上

When I transferred everything to one disk everything earned I hope to somebody will help 当我将所有内容转移到一个磁盘上时,所获得的一切都希望对您有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM