容器' Android Dependencies'引用非现有库&C; \ Users \ workspace \ FacebookSDK \ bin \ facebooksdk.jar'

时间:2014-12-24 02:46:37

标签: android facebook sdk dependencies

我被困在这两天以上了。我已经查看了所有其他类似的问题,并尝试实施他们的答案。什么都行不通。我已经多次清理和建造项目无济于事。我添加了库,删除了库...有人可以帮我解决这个问题吗?

我正在尝试将Eclipse SDK用于Eclipse中的项目。我将Facebook SDK库导入为现有的Android代码。这工作得很好。然后我创建了一个新的Android应用程序项目,转到其属性,并添加了Facebook SDK。然后我在项目屏幕上看到红色感叹号:

enter image description here

Problems View说:

The container 'Android Dependencies' references non existing library 'C:\Users\workspace\FacebookSDK\bin\facebooksdk.jar'

然后我检查了Java构建路径库,出现了这个错误:

enter image description here

它说facebooksdk.jar丢失了。我应该把它添加到某个地方吗?罐子在哪里?

我该如何解决这个问题?

编辑在将FacebookSDK添加到项目之前建立它。很多错误:

enter image description here

Description Resource    Path    Location    Type
Loader<SimpleGraphObjectCursor<T>> cannot be resolved to a type GraphObjectPagingLoader.java    /FacebookSDK/src/com/facebook/widget    line 119    Java Problem
Loader<SimpleGraphObjectCursor<T>> cannot be resolved to a type GraphObjectPagingLoader.java    /FacebookSDK/src/com/facebook/widget    line 109    Java Problem
The method onStartLoading() of type GraphObjectPagingLoader<T> must override or implement a supertype method    GraphObjectPagingLoader.java    /FacebookSDK/src/com/facebook/widget    line 118    Java Problem
The import android.support cannot be resolved   FacebookFragment.java   /FacebookSDK/src/com/facebook/widget    line 21 Java Problem
Fragment cannot be resolved to a type   FacebookFragment.java   /FacebookSDK/src/com/facebook/widget    line 42 Java Problem
The method deliverResult(SimpleGraphObjectCursor<T>) of type GraphObjectPagingLoader<T> must override or implement a supertype method   GraphObjectPagingLoader.java    /FacebookSDK/src/com/facebook/widget    line 104    Java Problem
The method onActivityCreated(Bundle) of type FacebookFragment must override or implement a supertype method FacebookFragment.java   /FacebookSDK/src/com/facebook/widget    line 47 Java Problem
...
...
Fragment cannot be resolved to a type   PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 253    Java Problem
Fragment cannot be resolved to a type   FacebookDialog.java /FacebookSDK/src/com/facebook/widget    line 341    Java Problem
Fragment cannot be resolved to a type   FacebookDialog.java /FacebookSDK/src/com/facebook/widget    line 327    Java Problem
The method getString(int) is undefined for the type PickerFragment<T>   PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 568    Java Problem
Fragment cannot be resolved to a type   FacebookDialog.java /FacebookSDK/src/com/facebook/widget    line 324    Java Problem
The method getLoaderManager() is undefined for the type PickerFragment<T>.LoadingStrategy   PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 883    Java Problem
LoaderManager cannot be resolved to a type  PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 884    Java Problem
Fragment cannot be resolved to a type   FacebookDialog.java /FacebookSDK/src/com/facebook/widget    line 320    Java Problem
Fragment cannot be resolved to a type   PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 55 Java Problem
The import android.support cannot be resolved   PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 26 Java Problem
The import android.support cannot be resolved   PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 25 Java Problem
The import android.support cannot be resolved   PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 24 Java Problem
Unnecessary @SuppressWarnings("deprecation")    WebDialog.java  /FacebookSDK/src/com/facebook/widget    line 402    Java Problem
The method getActivity() is undefined for the type PickerFragment<T>    PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 187    Java Problem
Fragment cannot be resolved to a type   PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 185    Java Problem
The method onActivityCreated(Bundle) of type PickerFragment<T> must override or implement a supertype method    PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 184    Java Problem
The method onCreateView(LayoutInflater, ViewGroup, Bundle) of type PickerFragment<T> must override or implement a supertype method  PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 153    Java Problem
Fragment cannot be resolved to a type   PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 133    Java Problem
The method onInflate(Activity, AttributeSet, Bundle) of type PickerFragment<T> must override or implement a supertype method    PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 132    Java Problem
Fragment cannot be resolved to a type   PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 120    Java Problem
The method onCreate(Bundle) of type PickerFragment<T> must override or implement a supertype method PickerFragment.java /FacebookSDK/src/com/facebook/widget    line 119    Java Problem
LocalBroadcastManager cannot be resolved to a type  BoltsMeasurementEventListener.java  /FacebookSDK/src/com/facebook   line 25 Java Problem
The import android.support cannot be resolved   BoltsMeasurementEventListener.java  /FacebookSDK/src/com/facebook   line 8  Java Problem
LocalBroadcastManager cannot be resolved to a type  BoltsMeasurementEventListener.java  /FacebookSDK/src/com/facebook   line 30 Java Problem
LocalBroadcastManager cannot be resolved    BoltsMeasurementEventListener.java  /FacebookSDK/src/com/facebook   line 25 Java Problem
LocalBroadcastManager cannot be resolved    BoltsMeasurementEventListener.java  /FacebookSDK/src/com/facebook   line 30 Java Problem

编译器版

enter image description here

1 个答案:

答案 0 :(得分:1)

问题是缺少facebooksdk.jar。 jar文件存在于PROJECT_FOLDER/bin/facebooksdk.jar中,在这种情况下,它应该在此处:FacebookSDK/bin/facebooksdk.jar。生成项目时会创建此文件。

因此,解决方案是构建FacebookSDK project,然后清理此项目AndroidFB6