容器“Android Dependencies”引用了不存在的库“facebook-android-sdk\facebook\bin\com_facebook_android.jar”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10248102/
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 03:00:46  来源:igfitidea点击:

The container 'Android Dependencies' references non existing library 'facebook-android-sdk\facebook\bin\com_facebook_android.jar'

androideclipsefacebooksdk

提问by user983965

I am trying to use the facebook sdk within my project, however keep receiving the following error:

我试图在我的项目中使用 facebook sdk,但是不断收到以下错误:

The container 'Android Dependencies' references non existing library 'facebook-android-sdk\facebook\bin\com_facebook_android.jar'

Has anyone experienced/resolved this problem?

有没有人遇到/解决过这个问题?

Thanks

谢谢

The errors are shown below:

错误如下所示:

The container 'Android Dependencies' references non existing library
'C:\Users\Mandip\facebook-android-sdk\facebook\bin\com_facebook_android.jar'
 The method onClick(View) of type new View.OnClickListener(){} must
override a superclass
 method FbDialog.java   /com_facebook_android/src/com/facebook/android  line
 101    Java Problem

 The method onServiceConnected(ComponentName, IBinder) of type
 Facebook.TokenRefreshServiceConnection must override a superclass
 method Facebook.java   /com_facebook_android/src/com/facebook/android  line
 575

The method onServiceDisconnected(ComponentName) of type
Facebook.TokenRefreshServiceConnection must override a superclass
method  Facebook.java   /com_facebook_android/src/com/facebook/android  line
 581

The project cannot be built until build path errors are resolved.

在解决构建路径错误之前,无法构建项目。

采纳答案by ValayPatel

Try this way

试试这个方法

how to make Library

图书馆的制作方法

回答by georgiecasey

Is there a bin folder in the com_facebook_android project? If not, the Facebook SDK wasn't built. Go to Project->Build Automatically and enable it.

com_facebook_android 项目中是否有 bin 文件夹?如果不是,则说明未构建 Facebook SDK。转到 Project->Build Automatically 并启用它。

回答by Zer0

For anyone who does come across this:

对于遇到此问题的任何人:

Go to: Project > Clean > Clean all projects.

去: Project > Clean > Clean all projects.

This might not always work but for me whenever there is some kind of dependency error, during the project load (after creating a new project) I just do this and surprisingly it works.

这可能并不总是有效,但对我而言,每当出现某种依赖错误时,在项目加载期间(创建新项目后),我都会这样做,并且令人惊讶地有效。

回答by Nathan

In my case the APK Builder build command was missing from the Eclipse .project file:

在我的情况下,Eclipse .project 文件中缺少 APK Builder 构建命令:

<buildCommand>
    <name>com.android.ide.eclipse.adt.ApkBuilder</name>
    <arguments/>
</buildCommand>

回答by RamKr

I had the similar problem while creating new projects for advance versions (say 4.4) in Eclipse. It automatically creates an appcompat library and adds as a reference to a new Android project for providing backward compatibility. The new project refers to appcompat.jar in bin folder and it does not exist, until appcompat library is built. I followed the below steps...

我在 Eclipse 中为高级版本(比如 4.4)创建新项目时遇到了类似的问题。它会自动创建一个 appcompat 库并添加作为对新 Android 项目的引用,以提供向后兼容性。新建工程指的是bin文件夹下的appcompat.jar,它不存在,直到appcompat库构建完成。我按照以下步骤...

  1. Clean and build your appcompat library project. It creates bin folder and puts appcompat.jar in it.
  2. Clean and build your main project. Error is resolved.
  1. 清理并构建您的 appcompat 库项目。它创建 bin 文件夹并将 appcompat.jar 放入其中。
  2. 清理并构建您的主项目。错误已解决。

Note: If you still don't get the bin/appcompat.jar than uncheck IsLibrary option in project properties, build and than check this option and clean build. It will do create bin/appcompat.jar and solve the issue.

注意:如果在项目属性中取消选中 IsLibrary 选项后仍然没有获得 bin/appcompat.jar,请构建并选中此选项并清理构建。它会创建 bin/appcompat.jar 并解决问题。

回答by Vlad

Here is what probably happened. You cleared a lot of projects including some Java libraries. Sometimes you may clear the entire workspace. This will kill jar files in their bin directories. You might have rebuild only your project. The problem is that you now have to rebuild the libraries in your workspace that you cleared. You will see that bin folder is no longer empty after that.

这就是可能发生的事情。您清除了许多项目,包括一些 Java 库。有时您可能会清除整个工作区。这将杀死其 bin 目录中的 jar 文件。您可能只重建了您的项目。问题是您现在必须在您清除的工作区中重建库。之后你会看到 bin 文件夹不再是空的。

回答by Prayag527

In my case the files were in appcombat_v7/lib folder.

在我的情况下,文件位于 appcombat_v7/lib 文件夹中。

So what I did was to right-click the .jar files (there will be two files select android-support-v4.jar) and then select Build Path > Add to Build Path.

所以我所做的是右键单击 .jar 文件(将有两个文件选择 android-support-v4.jar),然后选择Build Path > Add to Build Path

What this does is add this file to the Build Path (i.e it will add this file to the "bin folder") which will solve the problem.

这样做是将此文件添加到构建路径(即,它将将此文件添加到“bin 文件夹”),这将解决问题。