title: Facebook Sdk Has Not Been Initialized FacebookSdk.sdkInitialize()
body: <p>Hey I know this was asked before, but none of the solutions seem to help. I'm using first time Facebook SDK in my application.</p>
  
  <p>What I've tried:</p>
  
  <p>I had tried most of the things found on <strong>Internet</strong> but did not get anything regarding this.</p>
  
  <p>Here is my MainActivity.java:</p>
  
  <pre><code> public class MainActivity extends Activity {
  
    @Override
    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      FacebookSdk.sdkInitialize(getApplicationContext());
     } 
  }
  </code></pre>
  
  <p>Here is My Activitymain.xml:</p>
  
  <pre><code> &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  xmlns:facebook="http://schemas.android.com/apk/res-auto"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"&gt;
  
   &lt;com.facebook.login.widget.LoginButton
      android:id="@+id/connectWithFbButton"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_centerInParent="true"
      android:layout_gravity="center_horizontal"
      android:text="  connect_with_facebook" /&gt; 
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>see my <strong>Logcat</strong>:</p>
  
  <pre><code> 05-13 16:30:39.332: E/AndroidRuntime(10264): Caused by: The SDK has not been initialized, make sure to call FacebookSdk.sdkInitialize() first.
  </code></pre>