Question

I am using facebook integration API in my code. I have created sha1 key for Facebook,I got my APIID ,but the problem is that when I am trying to add facebook library in my project it's adding fine ,but when I am running it, its giving me NoClassDefFoundError error and library is not adding properly, where am I doing wrong?

Here is the image:

enter image description here

Here my facebook library is not adding properly, What should I do ?

Was it helpful?

Solution

Your facebook SDK library project and your Current Android project both should be in same directory. Try moving your facebook sdk library to your project's folder then it will 100% work properly.

For future reference always remember that your library project must me in same folder where your appliction is.

OTHER TIPS

Try this:

Go to Project/Properties/Java Build Path/Order and Export -- Make sure there's a check in front of Android Dependencies and the support library, if you use it.Mark all checkboxes and Click on Apply and clean the project.

Hope this helps.

Move your Facebook SDK library to your project's work space then it will 100% work properly.I think they both are not in the same directory , and you are suggested to check the other imports of any other project of your work space and put the Facebook SDK same as the others.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top