Reputation: 21
I worked on an android project when i got to reinstall windows. So after the pc-setup i wanted to continue programming. I re-installed the adt bundle and created a new workspace and imported the old project. After many problems i worked through, iam stuck now with this error: "cannot convert from android.support.v7.app.ActionBar to android.app.ActionBar" the code worked in my old project just fine, but now... it meows here:
ActionBar actionBar = getSupportActionBar();
android:minSdkVersion="13"
android:targetSdkVersion="19"
Library appcompat_v7 added
import android.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
Cleaning the project doesnt help either...
Upvotes: 0
Views: 3027
Reputation: 145
Your ActionBar
import is incorrect. You are importing the android ActionBar
instead of the support ActionBar
. Use this import instead:
import android.support.v7.app.ActionBar;
Upvotes: 3