Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build Target and Min SDK version in Android

Tags:

android

While creating an android project if i say that the Build Target of my Android porject is 2.2 (API Level is picked as 8) and in the text box for Min SDK version. If i put some value apart from the API level (smaller or greater than 8) of the build target then what happens?

Does the build happen according to the build target specified, but the application developed is compatible with the smaller android versions (if i specify API level < 8 ). Or the application developed is only compatible for the higher android version (if i specify API level > 8 ).

Can anyone please explain?

like image 733
Adithya Avatar asked Jul 06 '11 10:07

Adithya


People also ask

What is Min SDK version and target SDK version?

The min sdk version is the minimum version of the Android operating system required to run your application. The target sdk version is the version of Android that your app was created to run on.

What is the minimum Android SDK version?

Places SDK for Android versions released beginning in the third quarter of 2022 will only support devices running a minimum of Android API Level 26. App versions built with v2. x or lower of the Places SDK for Android will continue to work on devices running Android API Level 25 and below.

What is targeted SDK version?

android:targetSdkVersion — Specifies the API Level on which the application is designed to run. In some cases, this allows the application to use manifest elements or behaviors defined in the target API Level, rather than being restricted to using only those defined for the minimum API Level.

What is difference between compile SDK version and target SDK version?

compileSdkVersion is the version of the compiler used in building the app, while targetSdkVersion is the "API level that the application targets".


2 Answers

There is a similiar question already posted with an excellent answer:

Read the post by Steve H.

Android Min SDK Version vs. Target SDK Version

like image 176
Justin Shield Avatar answered Nov 11 '22 03:11

Justin Shield


Say you set the manifest API level to 4, then the app will work on any api 4 device provided. BUT the project will be built to API level 8 so if you have any post-level 4 api methods in your code then the app will crash.

like image 4
Kenny Avatar answered Nov 11 '22 04:11

Kenny