Android version compatible resolution

Source: Internet
Author: User






TD valign= "Top" background= "file:///C:/Users/ADMINI~1/AppData/Local/Temp/Wiz/ B2b224a1-b1f1-480e-9557-8d18393265ba_5_files/_line.gif "align=" left "style=" border-collapse:collapse; border:0px; line-height:30px; padding:0px "" Example: using Acionbar in less than API 15 is a direct crash and needs to be included in version compatibility detection: 1, first check the device's compiled version Build.VERSION.SDK_ The int constant represents the version number of the Android device. You can compare this constant to a constant that represents the honeycomb version. (The version number list can refer to page http://developer.android.com/reference/android/os/Build.VERSION_CODES.html.) Now the ActionBar code will be called only if the app is running on a honeycomb or later device. But the program will still crash 2, prohibit lint hint compatibility problem Unfortunately, although we have dealt with compatibility issues, but Android Lint is not known, it must be expressly forbidden to prompt compatibility issues. As shown in the code, add the following annotations before the OnCreate (Bundle) Implementation method.
   

Android version compatible resolution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.