Reputation: 386
I'm create app with SDK 1.6 and i want to, if my app running in android 3 : do sth , i using these code but the error told me HONEYCOMB
cannot be resolved or is not a field.
here is my code:
if (Build.VERSION.RELEASE == Build.VERSION_CODES.HONEYCOMB) {
// do anything...
} else {
// do anything...
}
Upvotes: 7
Views: 3993
Reputation: 1006574
For Build.VERSION_CODES.HONEYCOMB
to be recognized at compile time, you will need to have your build target set to API Level 11 or higher. In Eclipse, this is in the Android section of your project properties; for command-line builds, this is in default.properties
.
Upvotes: 21