Reputation:
I'm trying to import facebook sdk libraries into my android project and I successfully imported them . Now I want to import facebook sdk classes into my project, but I can't import them. What is the problem ? What am I doing wrong ? And when I checked again that fb sdk are added or not I see This error. Please help me out if am doing any thing wrong
I don't know if this is a good way but I uploaded a video on youtube and shared the link here, sorry for video's poor quality,but it's only a 25 seconds video.
Upvotes: 4
Views: 1684
Reputation: 6461
cracked it after hours of frustration....
well it goes like this. stand on the FaceBook Project you have created by the instructions of faceBook developers. right click and choose the properties , choose android and choose an android API from the list , press apply and ok. clean the project and see that the error disapeard. now it's the time to go to your project , press the right click and choose properties. go to Android , press the Add button and choose the faceBook project. press applay and ok . clean the projects just for good luck . and now you finally can impory com.facebook !
hope it will save some poor programmer valuble time in the future .
Upvotes: 2
Reputation: 1798
I was facing a similar issue. My project work space was in another directory and the SDK in another and based on the tutorials, I preferred to keep them that way. The solution is to include the Facebook SDK into your project's build path. You could do this in properties or click on the error icons > organize imports and it should automatically give you an option to add the SDK (if found) into your build path. That should work!
Upvotes: 0
Reputation: 2461
The problem is that the Facebook SDK still remains in your C:/Downloads folder. You have to put it in your Eclipse Workspace and then import it. It worked for me!
Upvotes: 0
Reputation: 7634
Your sdk and your project should be in the same path. If not the library will not be properly loaded. Check if your project is in the same path as your facebook sdk. Or copy the sdk to the same folder of your project and then load that as library.
Upvotes: 0