title: Class com.facebook.FacebookActivity Not Found on Initialising Facebook SDK on Android
body: <p>We are trying to integrate Facebook SDK in our project. We are not using (and won't) Android Studio. Facebook SDK is delivered as a .AAR file (dedicated to Android Studio). To be able to use it, as it is a simple .ZIP file,  we have extracted required files (classes.jar, resources).</p>
  
  <p>Following the documentation:</p>
  
  <ul>
  <li><p>We have modified our AndroidManifest.xml to add meta-data, facebook activities.</p></li>
  <li><p>We have modified our strings.xml to add a string .........</p></li>
  <li><p>In our project.properties we have modified target to android-21 so that resources can be compiled</p></li>
  <li><p>We are not using proguard</p></li>
  </ul>
  
  <p>Then:</p>
  
  <ul>
  <li><p>Compilation is finishing with no error</p></li>
  <li><p>When calling FacebookSdk.sdkInitialise(....) we have a lock up and we are are receiving the following error in log:</p>
  
  <pre><code>10-03 15:20:42.071: I/art(8735): Rejecting re-init on previously-failed class java.lang.Class&lt;com.facebook.FacebookActivity&gt;
  10-03 15:20:42.071: I/art(8735): Rejecting re-init on previously-failed class java.lang.Class&lt;com.facebook.FacebookActivity&gt;
  
  09-30 11:18:02.832: I/ActivityManager(776): Start proc 8618:com.mycompname.mygame/u0a699 for activity com.mycompname.mygame/.MyGameActivity
  09-30 11:18:02.953: E/AndroidRuntime(8618): FATAL EXCEPTION: main
  09-30 11:18:02.953: E/AndroidRuntime(8618): Process: com.mycompname.mygame, PID: 8618
  09-30 11:18:02.953: E/AndroidRuntime(8618): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/FacebookActivity;
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at com.facebook.internal.Validate.hasFacebookActivity(Validate.java:192)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at com.facebook.FacebookSdk.sdkInitialize(FacebookSdk.java:198)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at com.facebook.FacebookSdk.sdkInitialize(FacebookSdk.java:174)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at com.mycompname.mygame.MyGameActivityExtension.onMyGameActivityCreate(MyGameActivityExtension.java:36)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at com.mycompname.mygame.MyGameActivity.onCreate(MyGameActivity.java:641)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at android.app.Activity.performCreate(Activity.java:5990)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at android.app.ActivityThread.access$800(ActivityThread.java:151)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at android.os.Handler.dispatchMessage(Handler.java:102)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at android.os.Looper.loop(Looper.java:135)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at android.app.ActivityThread.main(ActivityThread.java:5254)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at java.lang.reflect.Method.invoke(Native Method)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at java.lang.reflect.Method.invoke(Method.java:372)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
  09-30 11:18:02.953: E/AndroidRuntime(8618): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.FacebookActivity" on path: DexPathList[[zip file "/data/app/com.mycompname.mygame-1/base.apk"],nativeLibraryDirectories=[/data/app/com.mycompname.mygame-1/lib/arm, /vendor/lib, /system/lib]]
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
  09-30 11:18:02.953: E/AndroidRuntime(8618):   ... 18 more
  09-30 11:18:02.953: E/AndroidRuntime(8618):   Suppressed: java.lang.NoClassDefFoundError: com.facebook.FacebookActivity
  09-30 11:18:02.953: E/AndroidRuntime(8618):                  at dalvik.system.DexFile.defineClassNative(Native Method)
  09-30 11:18:02.953: E/AndroidRuntime(8618):                  at dalvik.system.DexFile.defineClass(DexFile.java:226)
  09-30 11:18:02.953: E/AndroidRuntime(8618):                  at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)
  09-30 11:18:02.953: E/AndroidRuntime(8618):                  at dalvik.system.DexPathList.findClass(DexPathList.java:321)
  09-30 11:18:02.953: E/AndroidRuntime(8618):                  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
  09-30 11:18:02.953: E/AndroidRuntime(8618):                  ... 20 more
  09-30 11:18:02.953: E/AndroidRuntime(8618):   Suppressed: java.lang.ClassNotFoundException: com.facebook.FacebookActivity
  09-30 11:18:02.953: E/AndroidRuntime(8618):                  at java.lang.Class.classForName(Native Method)
  09-30 11:18:02.953: E/AndroidRuntime(8618):                  at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
  09-30 11:18:02.953: E/AndroidRuntime(8618):                  at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
  09-30 11:18:02.953: E/AndroidRuntime(8618):                  at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
  09-30 11:18:02.953: E/AndroidRuntime(8618):                  ... 19 more
  09-30 11:18:02.953: E/AndroidRuntime(8618):   Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
  </code></pre></li>
  </ul>
  
  <p>Does anyone have any idea of what's going on?</p>