27

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

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.

cyberlobe
  • 1,783
  • 1
  • 18
  • 30
user983965
  • 1,111
  • 3
  • 17
  • 31
  • 3
    check your project setting... I am sure you can fix this... Or may be build automatic is off... – ValayPatel Apr 20 '12 at 14:25
  • I have checked the 'facebook-android-sdk\facebook\bin\com_facebook_android.jar' the jar file doesn't exist, I tried downloading the SDK on several attempts and still the same error – user983965 Apr 20 '12 at 14:29
  • Did you check Android Properties of your project..?? below android build target version you can find Is Library check box... if that is not checked than check it.. Let me know if this is blocking you?? – ValayPatel Apr 20 '12 at 14:38

7 Answers7

63

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.

georgiecasey
  • 21,793
  • 11
  • 65
  • 74
  • 1
    The same thing was happened with me. while I was trying build my project the bin folder from sdk becomes empty.So you must have re-build sdk again. – Umesh Jan 12 '13 at 10:17
12

Try this way

how to make Library

ValayPatel
  • 1,094
  • 12
  • 15
  • Thanks Valay, it appears the SDK has errors within the java code, I have pasted the error above. In addtion, I have tried Is Library to no success. – user983965 Apr 20 '12 at 14:44
7

For anyone who does come across this:

Go to: 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.

Zer0
  • 1,002
  • 1
  • 19
  • 40
  • Your answer helped me - after doing 1 clean and number of times "build all" my project did build all the subprojects – david72 Mar 02 '17 at 21:46
3

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

<buildCommand>
    <name>com.android.ide.eclipse.adt.ApkBuilder</name>
    <arguments/>
</buildCommand>
Nathan
  • 5,272
  • 2
  • 26
  • 28
2

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...

  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.

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.

bummi
  • 27,123
  • 14
  • 62
  • 101
RamKr
  • 756
  • 10
  • 17
1

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.

Vlad
  • 4,425
  • 1
  • 30
  • 39
0

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

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.

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.

ChrisF
  • 134,786
  • 31
  • 255
  • 325
PrayagS
  • 11
  • 2