tehnolog
tehnolog

Reputation: 1214

Why Eclipse don't understand Build.VERSION_CODES.KITKAT?

I install SDK for Android 4.4, create new app (manifest minSdkVersion=19 and targetSdkVersion=19), but this code don't work

if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {

}

Screenshot

I'm sorry, I find my mistake. I change Project Build Target in Project's Properties to 19.

Upvotes: 4

Views: 6188

Answers (3)

Rensodarwin
Rensodarwin

Reputation: 286

If you are using android studio do the following:

1-File->project structure->Compile Sdk Version.

from there select the sdk version to latest so build.version_codes can find Kitkat or above.

Upvotes: 0

ranjk89
ranjk89

Reputation: 1570

Change you project's Build Target to Android 4.4 (19)

see - How to change target build on Android project?

Upvotes: 4

saiful103a
saiful103a

Reputation: 1129

You have to select Android 4.4 for your project if you haven't done so. Right click on top of the project->Properties->Android then check Android 4.4 if that is already there.

Upvotes: 7

Related Questions