输入容器“Android 依赖项”引用非现有库 android-support-v7-appcompat/bin/android-support-v7-appcompat.jar

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21678510/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 04:55:10  来源:igfitidea点击:

Type The container 'Android Dependencies' references non existing library android-support-v7-appcompat/bin/android-support-v7-appcompat.jar

androidandroid-actionbar-compat

提问by Khairil Ushan

I just got some kind of error when trying to using Action Bar Compat support library to my project, I don't know what's wrong, because I have followed the instructions from this link > http://developer.android.com/tools/support-library/setup.html

尝试将 Action Bar Compat 支持库用于我的项目时,我遇到了某种错误,我不知道出了什么问题,因为我已按照此链接 > http://developer.android.com/tools/ 中的说明进行操作支持库/setup.html

So, this is the screen shot of the error .. IDE

所以,这是错误的屏幕截图.. 集成开发环境

回答by dazilli

I also encountered such problem. My error was: The container 'Android Dependencies' references non existing library 'C:\development\adt-bundle-windows-x86-20140702\workspace\appcompat_v7\bin\appcompat_v7.jar'

我也遇到过这样的问题。我的错误是:容器 'Android Dependencies' 引用了非现有库 'C:\development\adt-bundle-windows-x86-20140702\workspace\appcompat_v7\bin\appcompat_v7.jar'

To solve this, I went project>properties>java build path>libraries>add jars>appcompat_v7>libs>, then I selected android-support-v7-appcompat.jar. After this, I went to project>clean. This fixed the problem. Hope you find my hint helpful.

为了解决这个问题,我去项目>属性>java构建路径>库>添加jars>appcompat_v7>libs>,然后我选择了android-support-v7-appcompat.jar。在此之后,我去了project>clean。这解决了问题。希望你觉得我的提示有帮助。

回答by Lee Chun Hoe

As in the instructionsyou mentioned, please make sure to follow this step to add .jar files instead of directly go to Properties > Java Build Path > Libraries to add them.

正如您提到的说明,请确保按照此步骤添加 .jar 文件,而不是直接转到“属性”>“Java 构建路径”>“库”来添加它们。

In the new library project, expand the libs/ folder, right-click each .jar file and select Build Path > Add to Build Path. For example, when creating the the v7 appcompat project, add both the android-support-v4.jar and android-support-v7-appcompat.jar files to the build path.

在新的库项目中,展开 libs/ 文件夹,右键单击每个 .jar 文件并选择 Build Path > Add to Build Path。例如,在创建 v7 appcompat 项目时,将 android-support-v4.jar 和 android-support-v7-appcompat.jar 文件添加到构建路径。

回答by kralvarado

I just had this issue, when creating a new project. After following the instructions from the link you provided, close your project, then close Eclipse, restart Eclipse, open your project then clean and build your project. This did the trick for me.

创建新项目时,我刚刚遇到了这个问题。按照您提供的链接中的说明进行操作后,关闭您的项目,然后关闭 Eclipse,重新启动 Eclipse,打开您的项目,然后清理并构建您的项目。这对我有用。

回答by wangqi060934

These days I used the latest android support library 21 and got the same issue.
I followed the answer of @dazilli,but do not work.
Just now,I updated the JDK from 6 to 7,then it solved the problem.

这些天我使用了最新的 android 支持库 21 并遇到了同样的问题。
我遵循了@dazili 的答案,但不起作用。
刚才我把JDK从6升级到了7,问题解决了。

回答by Dayanand Waghmare

First of all cleanup a library project and build project check library project has bin files after that clean your project its work for me

首先清理一个库项目并构建项目检查库项目是否有 bin 文件,然后清理你的项目对我来说它的工作

回答by Jerry

  • andriod platform must be android 5.0 and set 'target=21'
  • make sure download Extrasenter image description here
  • andriod 平台必须是 android 5.0 并设置 'target=21'
  • 确保下载 Extras在此处输入图片说明

回答by Prayag527

In my case the files were in appcombat_v7/lib folder, so what i did is right-click the .jar files (there will be two files select android-support-v4.jar) and then select Build Path>Add to Build Path. What it does is that it adds this file to the Build Path (i.e it will add this file to the "bin folder") which will solve the problem.

在我的情况下,文件位于 appcombat_v7/lib 文件夹中,所以我所做的是右键单击 .jar 文件(将有两个文件选择 android-support-v4.jar),然后选择 Build Path>Add to Build Path。它所做的是将这个文件添加到构建路径(即将这个文件添加到“bin 文件夹”),这将解决问题。