title: Login Facebook Sdk 4.14 Android Eclipse
body: <p>I am creating a login facebook in android using Eclipse.
  My project at <a href="https://www.mediafire.com/?6a55f9jql728crf" rel="nofollow">here</a></p>
  
  <p>In Android studio, It is easy to do that. But, in Eclipse, I add a Facebook lib .jar into my project. Fb .jar file is converted from facebook-android-sdk-4.14.0.aar downloaded at <a href="https://developers.facebook.com/docs/android/" rel="nofollow">here</a>.</p>
  
  <p>Add code in manifest</p>
  
  <blockquote>
    <p></p>
  </blockquote>
  
  <pre><code>&lt;activity
      android:name="com.facebook.FacebookActivity"
      android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
      android:label="@string/app_name"
      android:theme="@android:style/Theme.Translucent.NoTitleBar" /&gt;
  
  &lt;provider
      android:name="com.facebook.FacebookContentProvider"
      android:authorities="com.facebook.app.FacebookContentProvider819134394885..."
      android:exported="true" /&gt;
  </code></pre>
  
  <p>Set up facebook</p>
  
  <blockquote>
    <p>private void setUpFacebookLogin() {
        // TODO Auto-generated method stub
        FacebookSdk.sdkInitialize(getActivity());</p>
  </blockquote>
  
  <pre><code>callbackManager = CallbackManager.Factory.create();
  
  LoginManager.getInstance().registerCallback(callbackManager, new FacebookCallback&lt;LoginResult&gt;() {
      @Override
      public void onSuccess(LoginResult loginResult) {
          Log.d("Success", "Login");
          SPManager.setBooleanValue(SPManager.LOGIN_FACEBOOK, true);
  
      }
  
      @Override
      public void onCancel() {
          Toast.makeText(getActivity(), "Login Cancel", Toast.LENGTH_LONG).show();
      }
  
      @Override
      public void onError(FacebookException exception) {
          Toast.makeText(getActivity(), exception.getMessage(), Toast.LENGTH_LONG).show();
      }
  });
  </code></pre>
  
  <p>}</p>
  
  <pre><code>Event when click on button to login
  </code></pre>
  
  <blockquote>
    <p>LoginManager.getInstance().logInWithReadPermissions(this,
                        Arrays.asList("public_profile", "user_friends"));</p>
  </blockquote>
  
  <p>When I click on login button, the app has been crashed and showed message in logcat below:</p>
  
  <p>java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/R$layout; at com.facebook.FacebookActivity.onCreate(FacebookActivity.java:84)</p>
  
  <p>Appreciate any help</p>