开发者

How can i detect any version in my app?

开发者 https://www.devze.com 2023-03-17 01:35 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消