简体   繁体   English

从“Android私有库”中删除不在我项目的libs文件夹中的项目

[英]Remove item from “Android Private Libraries” that is not in my project's libs folder

The scenario is this: Eclipse Juno, ADT 22. The android project was created with a dependency on another Eclipse project (not an Android project, just a plain Java one) which exported a dependency on another library. 场景是这样的:Eclipse Juno,ADT 22.这个android项目的创建依赖于另一个Eclipse项目(不是一个简单的Java项目),它导出了对另一个库的依赖。 I have since removed the Java project from the list of dependencies, but the exported library dependency remains in the Android Private Libraries section of my project's build path, and I can't figure out how to remove it. 我已经从依赖项列表中删除了Java项目,但导出的库依赖项仍保留在项目构建路径的Android私有库部分中,我无法弄清楚如何删除它。

Any ideas? 有任何想法吗?

(For reference, here's what the build path looks like: (供参考,这是构建路径的样子:

java build path对话框显示库

The lib I want to get rid of is "simple-xml-2.6.2.jar", as I've switched to using JSON rather than XML and no longer need it. 我想要摆脱的lib是“simple-xml-2.6.2.jar”,因为我已经转而使用JSON而不是XML而不再需要它。 The project "bincomodel" is no longer a dependency of this project; 项目“bincomodel”不再是该项目的依赖项; I removed it on the Projects tab.) 我在“项目”选项卡上删除了它。)

In my case I had removed a few .jar libs from the file system however the project had not updated after doing SVN update. 在我的情况下,我从文件系统中删除了一些.jar库,但是在进行SVN更新后项目没有更新。

Once I clicked on the libs folder the .jar flashed like it was there and then disappeared. 一旦我点击了libs文件夹,.jar会像那里一样闪过,然后就消失了。 So if you have this issue then try Right Click project > Refresh, this will update all folders with the underlying file structure. 因此,如果您遇到此问题,请尝试右键单击项目>刷新,这将更新具有基础文件结构的所有文件夹。

Eclipse then auto updated to remove the files from the private libs build path. Eclipse然后自动更新以从私有libs构建路径中删除文件。

A 一种

Turns out there are two places that the reference to the previous project needed to be deleted from, not just one. 事实证明,有两个地方需要删除对上一个项目的引用,而不仅仅是一个。 It had to be taken out of both the "Projects" tab on "Build Path" and out of "Project References" in the project properties. 必须从“构建路径”中的“项目”选项卡和项目属性中的“项目引用”中取出它。

I believe that ADT is automatically including any jars in the "libs" folder of any project included in the "Project References" list, whether or not they are an exported dependency. 我相信ADT会自动包含“项目引用”列表中包含的任何项目的“libs”文件夹中的任何jar,无论它们是否是导出的依赖项。 It also appears to link by default any jars that are in source folders, which eclipse standard doesn't do. 它似乎默认链接源文件夹中的任何jar,eclipse标准不这样做。

exit eclipse and go to folder your_project/libs/. 退出eclipse并转到文件夹your_project / libs /。 Delete file .jar you want. 删除你想要的文件.jar。

我想你可以尝试从适当的.classpath删除不必要的dependency ,不建议使用此路径。

Edit the file project.properties in your filesystem and delete what you need. 编辑文件系统中的文件project.properties并删除所需内容。 In my case I removed gridlayout_v7 deleting the second line: 在我的情况下,我删除了gridlayout_v7删除第二行:

# Project target.
target=android-15
android.library.reference.1=../appcompat_v7
android.library.reference.2=../gridlayout_v7

暂无
暂无

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

相关问题 有没有一种简单的方法可以从Android项目的'libs'文件夹中删除不需要的jar? - Is there a simple way to remove unrequired jars from 'libs' folder for Android project? ADT不会将Android私有库与libs文件夹同步 - ADT doesnt sync Android Private Libraries with libs folder Android Private Libraries,Dependencies和libs文件夹之间有什么区别? - What is the difference between Android Private Libraries, Dependencies and the libs folder? 从“ Android私有库”中删除项目时显示为灰色。 无法移除罐子 - Remove item from “Android Private Libraries” grayed out. Cannot remove jar libs文件夹和Android私有库中的commons-io-2.4.jar - 这是一个错误吗? - commons-io-2.4.jar both in the libs folder and in the Android Private Libraries - is it a mistake? 如何在我的项目Android中创建libs文件夹 - How can i create libs folder in my project Android Android中的库不会添加到Android Private Libraries文件夹中 - Libraries are not adding into Android Private Libraries folder in Android 如何从android studio的项目视图中的外部库文件夹中删除未使用的库? - How to remove unused libraries from an external library folder in project view inside android studio? 我的库组件不在Android Studio项目中的库文件夹中是否不好? - Is it bad that my library components are not in a libraries folder in my Android Studio project? Git忽略Android Studio项目libs文件夹 - Git ignoring Android Studio project libs folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM