简体   繁体   中英

Android Facebook SDK no class def found com.facebook.android.Facebook

I'm using a version of the Facebook SDK, I'm not sure which version as I was given the eclipse project and told to use it but it was given to me before SDK 3.0 was released, so most likely 2.0, in an Android app. The app's project has the SDK project listed as a required project to enable us to prompt for Facebook login within the app.

I've tried telling eclipse to export the project with or without the Facebook project but it makes no difference.

I have also tried running the app both with and without the official Facebook app installed. Every time I try to initiate the login for Facebook, I get the message:

01-24 19:05:11.863: E/AndroidRuntime(12697): Caused by: java.lang.NoClassDefFoundError: com.facebook.android.Facebook

Any help or insight is greatly appreciated.

As it turns out, one of my team-mates loaded up the project from Git, compiled it, and ran it with no changes and it works just fine. Clearly something is messed up with my setup somewhere whether it is with the Facebook SDK or Eclipse. I'm running Eclipse Juno, he is running Eclipse Indigo.

This turned out to be because I hadn't included the library project in the "Android" section of the project's properties.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM