title: error in link facebook with android app
body: <p>i get an error when i want to link my android app to facebook api my app is aim to get a photo from camera and then share this photo via my facebook account i have use the latest facebook api i think the error in splashFragment i think it don't find it and this my code</p>
  
  <p><em><strong>Xml File</em></strong></p>
  
  <pre><code>&lt;?xml  version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
      &lt;TextView
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:text="@string/hello" /&gt;
  
      &lt;TextView
              android:id="@+id/profile_name"
              android:layout_width="174dp"
              android:layout_height="wrap_content"
              android:layout_marginTop="35dp"
              android:lines="2"
              android:textSize="17sp"
              android:text="Get Starting"
              android:layout_gravity="center_horizontal"
              android:gravity="center_horizontal"/&gt;
  
      &lt;Button
          android:id="@+id/op_cam"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:text="Open Camera" /&gt;
  
      &lt;ImageView
          android:id="@+id/login"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/login_button" /&gt;
  
  
      &lt;ImageView
          android:id="@+id/logout"
          android:layout_width="78dp"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:visibility="invisible" /&gt;
  
      &lt;Button
          android:id="@+id/shareButton"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:gravity="center|right"
          android:text="Share"
          android:textStyle="bold" /&gt;
  
  &lt;/LinearLayout&gt;
  
  &lt;LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"&gt;
  
      &lt;fragment android:name="com.facebook.scrumptious.SelectionFragment"
            android:id="@+id/selectionFragment"
            android:layout_width="match_parent"
            android:layout_height="match_parent" /&gt;
  
      &lt;fragment android:name="com.facebook.scrumptious.SplashFragment"
            android:id="@+id/splashFragment"
            android:layout_width="match_parent"
            android:layout_height="match_parent" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><em><strong>and this the code</em></strong></p>
  
  <pre><code>package work.islam;
  
  import com.facebook.Session;
  import com.facebook.SessionState;
  import com.facebook.UiLifecycleHelper;
  
  import android.R;
  import android.content.Context;
  import android.content.Intent;
  import android.os.Bundle;
  import android.support.v4.app.Fragment;
  import android.support.v4.app.FragmentActivity;
  import android.support.v4.app.FragmentManager;
  import android.support.v4.app.FragmentTransaction;
  import android.util.AttributeSet;
  import android.view.View;
  import android.view.ViewGroup;
  
  
  public class FaceBook_Activity_sharing extends FragmentActivity {
  
      private static final int SPLASH = 0;
      private static final int SELECTION = 1;
      private static final int FRAGMENT_COUNT = SELECTION +1;
  
  
  
      private Fragment[] fragments = new Fragment[FRAGMENT_COUNT];
  
      @Override
      protected void onCreate(Bundle arg0) {
          // TODO Auto-generated method stub
          super.onCreate(arg0);
  
          uiHelper = new UiLifecycleHelper(this, callback);
          uiHelper.onCreate(arg0);
          FragmentManager fm = getSupportFragmentManager();
          fragments[SPLASH] = fm.findFragmentById(R.id.splashFragment);
          fragments[SELECTION] = fm.findFragmentById(R.id.selectionFragment);
  
          FragmentTransaction transaction = fm.beginTransaction();
          for(int i = 0; i &lt; fragments.length; i++) {
              transaction.hide(fragments[i]);
          }
          transaction.commit();
      }
  
      private void showFragment(int fragmentIndex, boolean addToBackStack) {
          FragmentManager fm = getSupportFragmentManager();
          FragmentTransaction transaction = fm.beginTransaction();
          for (int i = 0; i &lt; fragments.length; i++) {
              if (i == fragmentIndex) {
                  transaction.show(fragments[i]);
              } else {
                  transaction.hide(fragments[i]);
              }
          }
          if (addToBackStack) {
              transaction.addToBackStack(null);
          }
          transaction.commit();
      }
  
      private boolean isResumed = false;
  
      @Override
      public void onResume() {
          super.onResume();
          uiHelper.onResume();
          isResumed = true;
      }
  
      @Override
      public void onPause() {
          super.onPause();
          uiHelper.onPause();
          isResumed = false;
      }
  
      @Override
      public void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
          uiHelper.onActivityResult(requestCode, resultCode, data);
      }
  
      @Override
      public void onDestroy() {
          super.onDestroy();
          uiHelper.onDestroy();
      }
  
      @Override
      protected void onSaveInstanceState(Bundle outState) {
          super.onSaveInstanceState(outState);
          uiHelper.onSaveInstanceState(outState);
      }
  
  
      @SuppressWarnings("unused")
      private void onSessionStateChange(Session session, SessionState state, Exception exception) {
          // Only make changes if the activity is visible
          if (isResumed) {
              FragmentManager manager = getSupportFragmentManager();
              // Get the number of entries in the back stack
              int backStackSize = manager.getBackStackEntryCount();
              // Clear the back stack
              for (int i = 0; i &lt; backStackSize; i++) {
                  manager.popBackStack();
              }
              if (state.isOpened()) {
                  // If the session state is open:
                  // Show the authenticated fragment
                  showFragment(SELECTION, false);
              } else if (state.isClosed()) {
                  // If the session state is closed:
                  // Show the login fragment
                  showFragment(SPLASH, false);
              }
          }
      }
  
      @Override
      protected void onResumeFragments() {
          super.onResumeFragments();
          Session session = Session.getActiveSession();
  
          if (session != null &amp;&amp; session.isOpened()) {
              // if the session is already open,
              // try to show the selection fragment
              showFragment(SELECTION, false);
          } else {
              // otherwise present the splash screen
              // and ask the person to login.
              showFragment(SPLASH, false);
          }
      }
  
      private UiLifecycleHelper uiHelper;
      private Session.StatusCallback callback = 
          new Session.StatusCallback() {
          @Override
          public void call(Session session, 
                  SessionState state, Exception exception) {
              onSessionStateChange(session, state, exception);
          }
      };
  
  
  }
  </code></pre>
  
  <p>also i tried to connect facebook only with android but i failed 
  i want to edit this code or just to connect facebook with android</p>
  
  <p><em><strong>this is the error i get</em></strong> </p>
  
  <pre><code>Description Resource    Path    Location    Type
  activity_dash_board cannot be resolved or is not a field    TestfacebookstackoverflowActivity.java  /testfacebookstackoverflow/src/islam/work/com   line 33 Java Problem
  AppEngineDriver cannot be resolved to a type    DemoEntityManagerSqlFactory.java    /PhotoSharingDemo/src/com/google/cloud/demo/model/sql   line 45 Java Problem
  AppEngineFile cannot be resolved to a type  PhotoServiceManager.java    /PhotoSharingDemo/src/com/google/cloud/demo line 156    Java Problem
  BlobKey cannot be resolved to a type    DownloadServlet.java    /PhotoSharingDemo/src/com/google/cloud/demo line 42 Java Problem
  BlobKey cannot be resolved to a type    Photo.java  /PhotoSharingDemo/src/com/google/cloud/demo/model   line 26 Java Problem
  BlobKey cannot be resolved to a type    Photo.java  /PhotoSharingDemo/src/com/google/cloud/demo/model   line 28 Java Problem
  BlobKey cannot be resolved to a type    PhotoManagerSql.java    /PhotoSharingDemo/src/com/google/cloud/demo/model/sql   line 233    Java Problem
  BlobKey cannot be resolved to a type    PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 48 Java Problem
  BlobKey cannot be resolved to a type    PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 49 Java Problem
  BlobKey cannot be resolved to a type    PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 53 Java Problem
  BlobKey cannot be resolved to a type    PhotoServiceManager.java    /PhotoSharingDemo/src/com/google/cloud/demo line 56 Java Problem
  BlobKey cannot be resolved to a type    PhotoServiceManager.java    /PhotoSharingDemo/src/com/google/cloud/demo line 71 Java Problem
  BlobKey cannot be resolved to a type    PhotoServiceManager.java    /PhotoSharingDemo/src/com/google/cloud/demo line 155    Java Problem
  BlobKey cannot be resolved to a type    PhotoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/sql   line 27 Java Problem
  BlobKey cannot be resolved to a type    PhotoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/sql   line 58 Java Problem
  BlobKey cannot be resolved to a type    PhotoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/sql   line 59 Java Problem
  BlobKey cannot be resolved to a type    PhotoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/sql   line 63 Java Problem
  BlobKey cannot be resolved to a type    PhotoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/sql   line 64 Java Problem
  BlobKey cannot be resolved to a type    UploadHandlerServlet.java   /PhotoSharingDemo/src/com/google/cloud/demo line 47 Java Problem
  BlobKey cannot be resolved to a type    UploadHandlerServlet.java   /PhotoSharingDemo/src/com/google/cloud/demo line 48 Java Problem
  BlobKey cannot be resolved to a type    UploadHandlerServlet.java   /PhotoSharingDemo/src/com/google/cloud/demo line 64 Java Problem
  BlobstoreService cannot be resolved to a type   DownloadServlet.java    /PhotoSharingDemo/src/com/google/cloud/demo line 43 Java Problem
  BlobstoreService cannot be resolved to a type   PhotoServiceManager.java    /PhotoSharingDemo/src/com/google/cloud/demo line 51 Java Problem
  BlobstoreService cannot be resolved to a type   PhotoServiceManager.java    /PhotoSharingDemo/src/com/google/cloud/demo line 160    Java Problem
  BlobstoreService cannot be resolved to a type   UploadHandlerServlet.java   /PhotoSharingDemo/src/com/google/cloud/demo line 46 Java Problem
  BlobstoreServiceFactory cannot be resolved  DownloadServlet.java    /PhotoSharingDemo/src/com/google/cloud/demo line 43 Java Problem
  BlobstoreServiceFactory cannot be resolved  PhotoServiceManager.java    /PhotoSharingDemo/src/com/google/cloud/demo line 51 Java Problem
  BlobstoreServiceFactory cannot be resolved  PhotoServiceManager.java    /PhotoSharingDemo/src/com/google/cloud/demo line 160    Java Problem
  BlobstoreServiceFactory cannot be resolved  UploadHandlerServlet.java   /PhotoSharingDemo/src/com/google/cloud/demo line 46 Java Problem
  CompositeFilterOperator cannot be resolved to a variable    CommentManagerNoSql.java    /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 61 Java Problem
  CompositeFilterOperator cannot be resolved to a variable    PhotoManagerNoSql.java  /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 99 Java Problem
  DashBoard cannot be resolved to a type  TestfacebookstackoverflowActivity.java  /testfacebookstackoverflow/src/islam/work/com   line 79 Java Problem
  DatastoreService cannot be resolved to a type   DemoEntityManagerNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 59 Java Problem
  DatastoreService cannot be resolved to a type   DemoEntityManagerNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 81 Java Problem
  DatastoreService cannot be resolved to a type   DemoEntityManagerNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 113    Java Problem
  DatastoreService cannot be resolved to a type   DemoEntityManagerNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 128    Java Problem
  DatastoreService cannot be resolved to a type   DemoEntityManagerNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 195    Java Problem
  DatastoreService cannot be resolved to a type   PhotoManagerNoSql.java  /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 133    Java Problem
  DialogError cannot be resolved to a type    FaceBookSharingPhotoActivity.java   /FaceBookSharingPhoto/src/work/islam    line 197    Java Problem
  DialogListener cannot be resolved to a type FaceBookSharingPhotoActivity.java   /FaceBookSharingPhoto/src/work/islam    line 189    Java Problem
  Entity cannot be resolved to a type CommentManagerNoSql.java    /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 95 Java Problem
  Entity cannot be resolved to a type CommentNoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 33 Java Problem
  Entity cannot be resolved to a type CommentNoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 47 Java Problem
  Entity cannot be resolved to a type CommentNoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 52 Java Problem
  Entity cannot be resolved to a type CommentNoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 57 Java Problem
  Entity cannot be resolved to a type CommentNoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 63 Java Problem
  Entity cannot be resolved to a type CommentNoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 68 Java Problem
  Entity cannot be resolved to a type CommentNoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 74 Java Problem
  Entity cannot be resolved to a type CommentNoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 79 Java Problem
  Entity cannot be resolved to a type CommentNoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 84 Java Problem
  Entity cannot be resolved to a type CommentNoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 89 Java Problem
  Entity cannot be resolved to a type CommentNoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 94 Java Problem
  Entity cannot be resolved to a type CommentNoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 99 Java Problem
  Entity cannot be resolved to a type CommentNoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 104    Java Problem
  Entity cannot be resolved to a type DemoEntityManagerNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 83 Java Problem
  Entity cannot be resolved to a type DemoEntityManagerNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 114    Java Problem
  Entity cannot be resolved to a type DemoEntityManagerNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 128    Java Problem
  Entity cannot be resolved to a type DemoEntityManagerNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 146    Java Problem
  Entity cannot be resolved to a type DemoEntityManagerNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 150    Java Problem
  Entity cannot be resolved to a type DemoEntityManagerNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 197    Java Problem
  Entity cannot be resolved to a type DemoEntityManagerNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 221    Java Problem
  Entity cannot be resolved to a type DemoEntityNoSql.java    /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 26 Java Problem
  Entity cannot be resolved to a type DemoEntityNoSql.java    /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 28 Java Problem
  Entity cannot be resolved to a type DemoEntityNoSql.java    /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 29 Java Problem
  Entity cannot be resolved to a type DemoEntityNoSql.java    /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 33 Java Problem
  Entity cannot be resolved to a type DemoEntityNoSql.java    /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 33 Java Problem
  Entity cannot be resolved to a type DemoEntityNoSql.java    /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 37 Java Problem
  Entity cannot be resolved to a type DemoEntityNoSql.java    /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 37 Java Problem
  Entity cannot be resolved to a type DemoEntityNoSql.java    /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 40 Java Problem
  Entity cannot be resolved to a type DemoEntityNoSql.java    /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 41 Java Problem
  Entity cannot be resolved to a type DemoUserManagerNoSql.java   /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 45 Java Problem
  Entity cannot be resolved to a type DemoUserNoSql.java  /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 28 Java Problem
  Entity cannot be resolved to a type DemoUserNoSql.java  /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 38 Java Problem
  Entity cannot be resolved to a type DemoUserNoSql.java  /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 43 Java Problem
  Entity cannot be resolved to a type DemoUserNoSql.java  /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 48 Java Problem
  Entity cannot be resolved to a type DemoUserNoSql.java  /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 53 Java Problem
  Entity cannot be resolved to a type DemoUserNoSql.java  /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 58 Java Problem
  Entity cannot be resolved to a type PhotoManagerNoSql.java  /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 126    Java Problem
  Entity cannot be resolved to a type PhotoManagerNoSql.java  /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 136    Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 37 Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 44 Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 49 Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 54 Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 59 Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 65 Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 70 Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 75 Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 80 Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 85 Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 90 Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 95 Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 100    Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 105    Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 110    Java Problem
  Entity cannot be resolved to a type PhotoNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 117    Java Problem
  EntityNotFoundException cannot be resolved to a type    DemoEntityManagerNoSql.java /PhotoSharingDemo/src/com/google/cloud/demo/model/nosql line 131    Java Problem
  error: Error: String types not allowed (at 'layout_height' with value 'match_parent').  main.xml    /testfacebookstackoverflow/res/layout   line 9  Android AAPT Problem
  error: Error: String types not allowed (at 'layout_height' with value 'match_parent').  main.xml    /testfacebookstackoverflow/res/layout   line 15 Android AAPT Problem
  error: Error: String types not allowed (at 'layout_width' with value 'match_parent').   main.xml    /testfacebookstackoverflow/res/layout   line 9  Android AAPT Problem
  error: Error: String types not allowed (at 'layout_width' with value 'match_parent').   main.xml    /testfacebookstackoverflow/res/layout   line 15 Android AAPT Problem
  </code></pre>