0

I followed using facebook sdk in android studio and since I have a libs folder under my 'app' folder, I tried to import it in there by selecting libs and File-->Import Module. I get this:

Android Studio 0.6.0 with Facebook SDK 3.14.1

I'm able to run ProfilePictureSample, which relies on the facebook module, but not app. Logcat says " java.lang.NoClassDefFoundError: com.facebook.android.Facebook" even though I can verify it's there. I get this messsage even after cutting the facebook module and pasting it into the libs folder. Here is a snippet of app-->build.gradle:

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/Parse-1.5.0/Parse-1.5.0.jar') ...
Community
  • 1
  • 1
HukeLau_DABA
  • 2,384
  • 6
  • 33
  • 51

1 Answers1

0

you don't add it under the libs folder, it can be at the same level as "app". In app/build.gradle, add this line: "compile project(':facebook')"

HukeLau_DABA
  • 2,384
  • 6
  • 33
  • 51