I want to create an Android app that can be used on 2.3.3 all the way through to 4.0.3. I want to use the Support Library, so that I can use fragments, etc.
Do I set the build target to API level 10 (2.3.3) or do I set it to 15 (4.0.3)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The answers here are somewhat misleading, as you don’t need to set your
targetSdkVersion="15"in order for your application to be used all the way up to version 4.0.3. Setting yourminSdkVersion="10"alone will allow you to use your application on all devices running Gingerbread and above.The
targetSdkVersionattribute specifies the API level on which the application is designed to run. Preferably you would want its value to correspond to the most recently released SDK ("15", at the time of this posting). Strictly speaking, however, its value should be given by the largest SDK version number that you have tested your application against.The benefits of a higher
targetSdkVersionis that it will enable you to take advantage of shiny new features in the recently released APIs. For instance, if in this case you didn’t set yourtargetSdkVersion, it would default to yourminSdkVersion(which is currently"10"). Because of this, your application won’t be able to make use of the new UI themes (i.e.Theme.Holo) introduced inHoneyCombandICS, and will probably be forced into compatibility mode (which is ugly and makes your app look old and poorly maintained).