Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between API Level and SDK Version [duplicate]

Tags:

android

I'm new to Android developing, and I would like to know what is the connection or difference between the version and the API level. What is each one referring to? And what does it mean when I decide to develop some app for API 14 or for android version 4.0?

Or is one a subset of the other? I simply didn't get the difference, and why are there two counters?

Thanks

like image 712
Ramzi Khahil Avatar asked Dec 25 '11 12:12

Ramzi Khahil


People also ask

Is API and SDK version same?

The real difference is that an API is really just an interface for a service, while an SDK is the tools/components/code fragments that have been created for a specific purpose.

What does SDK version mean?

The target sdk version is the version of Android that your app was created to run on. The compile sdk version is the the version of Android that the build tools uses to compile and build the application in order to release, run, or debug. Usually the compile sdk version and the target sdk version are the same.

What is difference between API level in Android?

API Level is an integer value that uniquely identifies the framework API revision offered by a version of the Android platform. The Android platform provides a framework API that applications can use to interact with the underlying Android system.

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".


6 Answers

Well, API is for development, so the changes in new API version are more "inside". But new version of Android usually adds more features for users, that are "visible".

Check this page http://developer.android.com/guide/appendix/api-levels.html, there is a table that shows relations between versions and API levels.

like image 111
Jaa-c Avatar answered Oct 19 '22 16:10

Jaa-c


Multiple versions of Android can have the same API level but the API as an integer allows developers to more easily target devices. The chart below will give you an idea of their relationship but only the documentation contains exhaustive listings of the API levels and how they differ from each other.

Platform Versions

Source: developer.android.com.

Because this data is gathered from the new Google Play Store app, which supports Android 2.2 and above, devices running older versions are not included. However, in August, 2013, versions older than Android 2.2 accounted for about 1% of devices that checked in to Google servers (not those that actually visited Google Play Store).

like image 44
Alastair Avatar answered Oct 19 '22 17:10

Alastair


In addition to the answers provided, there is a detailed explanation of the Android Platform usage on Wikipedia (permalink).

This table will give you a highlight of Android API vs Version.

enter image description here

like image 24
dsharew Avatar answered Oct 19 '22 17:10

dsharew


A device running Android with version X will usually support applications written for API X and below.

This means if you want your app to support API 8, devices ver 8 will be able to run it, but also devices of ver 9, 10, 11, etc.

Here is the table which explains the ties between the numbers: http://developer.android.com/guide/appendix/api-levels.html

like image 43
talkol Avatar answered Oct 19 '22 17:10

talkol


In a short note:

Main difference between them is that API level for android application development framework API on the other hand android version is maintained to mention new features to user level.

In details:

API Level is an integer value that uniquely identifies the framework API revision offered by a version of the Android platform.

The Android platform provides a framework API that applications can use to interact with the underlying Android system. The framework API consists of:

  • A core set of packages and classes
  • A set of XML elements and attributes for declaring a manifest file
  • A set of XML elements and attributes for declaring and accessing resources
  • A set of Intents
  • A set of permissions that applications can request, as well as permission enforcements included in the system

For more details you can visit this link: https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels

like image 27
Monir Zzaman Avatar answered Oct 19 '22 17:10

Monir Zzaman


API Level is an integer value that uniquely identifies the framework API revision offered by a version of the Android platform.

You can have a new Android version with the same API release as the previous version.

Check out https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels

like image 21
Rick Avatar answered Oct 19 '22 17:10

Rick