Not targeting the latest versions of Android

It says this because of targetSdkVersion="16". API 16 is Jellybean 4.1 and 4.1.1, while Jellybean 4.2 is API 17.

Try using:

<uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

Also, keep in mind that this is a Lint warning. These warning exist to help you better your code and make it easy to maintain, while being compatible with the latest Android changes. Ignoring this will not cause you any immediate problems.

EDIT: With Android 4.3, the latest SDK version is now 18, so you should use:

...
        android:targetSdkVersion="18" />

EDIT 2: With Android 4.4, the latest SDK version is now 19, so you should use:

...
        android:targetSdkVersion="19" />

EDIT 3: With Android L, you must use the following values, as described here:

compileSdkVersion="android-L"
minSdkVersion="L"
targetSdkVersion="L"

EDIT 4: With Android L’s public release, you must use 21 instead:

...
        android:targetSdkVersion="21" />

20 was used for 4.4W, or for Android Wear.

EDIT 5: With Android M’s public release, you must use 23 instead:

...
        android:targetSdkVersion="23" />

In the future please consult the official Android documentation to keep yourself up-to-date with the latest Android API Levels.

Leave a Comment