title: Android Error: type mismatch cannot convert from android.app.actionbar to android.support.v7.app.actionbar
body: <p>I'm currently getting the error:</p>
  
  <pre><code>type mismatch cannot convert from android.app.actionbar to android.support.v7.app.actionbar
  </code></pre>
  
  <p>The error is occurring on <code>actionBar=getActionBar();</code>. </p>
  
  <p>I'm wondering if it's something to do with my import files or possibly how I've set up my fragment XML files? Here is my relevant code: </p>
  
  <pre><code>import android.app.AlertDialog;
  import android.content.DialogInterface;
  import android.content.Intent;
  import android.content.SharedPreferences;
  import android.os.Bundle;
  import android.support.v4.app.FragmentActivity;
  import android.support.v4.app.FragmentTransaction;
  import android.support.v7.app.ActionBar;
  import android.support.v7.app.ActionBar.Tab;
  import android.support.v7.app.ActionBar.TabListener;
  import android.support.v7.app.ActionBarActivity;
  import android.util.Log;
  import android.view.Menu;
  import android.view.MenuInflater;
  import android.view.MenuItem;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.ImageButton;
  import android.widget.Toast;
  
  public class Main_activity extends FragmentActivity implements TabListener {
  
      public static final String PREFS_NAME = "MyPreferncesfile";
  
      ActionBar actionBar; 
      @Override
      public void onCreate(Bundle arg0) {
          super.onCreate(arg0);
          setContentView(R.layout.activity_main);
  
          actionBar=getActionBar();
          actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
  
          ActionBar.Tab tab1=actionBar.newTab();
          tab1.setText("Tab 1");
          tab1.setTabListener(this); 
  
          ActionBar.Tab tab2=actionBar.newTab();
          tab2.setText("Tab 2");
          tab2.setTabListener(this); 
  
          ActionBar.Tab tab3=actionBar.newTab();
          tab3.setText("Tab 1");
          tab3.setTabListener(this); 
  
          actionBar.addTab(tab1);
          actionBar.addTab(tab2);
          actionBar.addTab(tab3);
      }
  
      public void onTabReselected1(Tab tab, FragmentTransaction ft) {
  
          Log.d("VIVZ", "onTabReselected at "+" position "+tab.getPosition()+" name "+tab.getText());
  
      }
  
      public void onTabSelected1(Tab tab, FragmentTransaction ft) {
          Log.d("VIVZ", "onTabSelected at "+" position "+tab.getPosition()+" name "+tab.getText());
  
      }
  
      public void onTabUnselected1(Tab tab, FragmentTransaction ft) {
          Log.d("VIVZ", "onTabUnselected at "+" position "+tab.getPosition()+" name "+tab.getText());         
      }
   }
  </code></pre>