How can i detect any version in my app?
I'm create app with SDK 1.6 and i want to, if my app running in android 3 : do st开发者_如何学Pythonh , 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...
}
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
.
精彩评论