Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Build a Simple Android App (2014) Getting Started with Android Creating the Fun Facts Project

Target sdk ??

What is the meaning of Target SDK. I got confused in understanding this from the start when it was mentioned in Eclipse.

3 Answers

I'm sure you will be familiar with the different SDK types i.e. Froyo, GingerBread, Lollipop, etc. They all have version names associated with them. For e.g. Android SDK 4.0 or API 14 is also called IceCreamSandwich .

When you first install android studio by default it installs along with the current SDK. However you are free to install any older SDK`s that you may wish to use.

When dealing with Android application there are probably a few SDK types that you will need to be familiar with

Min SDK - this is the minimum SDK or the minimum Android version that the users will need ti have on their phone to run your application. For instance if you set the minimum SDK level at API 14, any device with version lower than that will not be able able to run your application

Target SDK - if by default you don not give a target SDK value it will use the same value as that of the minimum SDK. Target SDK is used to tell the Android application that this is the target API level of SDK version that I am going to build the application for. In is different from minimum SDK in the sense that, when a new Android version comes in the market, your application will still continue to run but through compatibility means.

Max SDK - it is just the opposite of minimum SDK, it defines the maximum SDK level that your application will run on. So any devices below that are fine.

Hope this helps

Here is a link to the developer site on sdk,hope it helps http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#target

Ok, I start to gain some understanding. ... do I understand right now that if the targetSDK differs from the minSDK and users sdk is higher "compatibility means" kick in to keep the app at least running (even if that means that it will look different)? Than why would I want to bother defining a maxSDK if "compatibility means" kick in anyway when the users sytem has a higher version than my targetSDK?