API Level does not agree

Asked

Viewed 94 times

0

I’m taking my first steps in developing for Android (today is my second day of study). See below my configuration files and the error I’m finding:

Initially my Androidmanifest.xml was like this:

<uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="19" />

When I tried to insert the following lines into my xml style.:

<style name="MyActionBar"
           parent="@android:style/Widget.Holo.ActionBar.Solid">
        <item name="android:background">@drawable/actionbar_background</item>
    </style>

I got the mistake next:

@android:style/Widget.Holo.Actionbar.Solid requires API level 14 (Current min is 11)

So I changed the Androidmanifest.xml for:

<uses-sdk
        android:minSdkVersion="14"
        android:targetSdkVersion="19" />

But the error persists. I need to make some further changes to recognize that I changed the minSdkVersion to 14?

PS.: I’m trying to follow the example found at this link here

  • 2

    If you are using the Eclipse try Project->Clean...

  • Adds as response. Worked!

  • 2

    This is a recurrent situation in Eclipse. When something that should work doesn’t work, try to use it first before you break your head looking for a solution.

1 answer

1

Just give Build > Rebuild Project , in the case of Intelli J or Android Studio or Project > Build Project, in the case of Eclipse.

Search how to use the ok appcompat-v7 library.

With it you can provide graphical features of higher versions of Andorid, such as 4.0, 4.1.2, etc to run in older versions (from API 7 or 8, if I’m not mistaken)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.