Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android SDK Tools 21: Help in Compile with tab

enter image description here

Recently I updated SDK, and this new 'compile with' option appears.. what does it mean?

like image 939
DroidLearner Avatar asked Oct 06 '22 21:10

DroidLearner


1 Answers

It means that despite targetSdk, "compile with SDK" version will be used. This is helpful to target higher SDK and avoid accidental use of newer API. Or, in other words, you want to target API17 but stay compatible with API8 without much effort. So you set target to API17 but compile with to API8. Now, if you code for any reason use anything that was introduced in API9 or up it will not compile. Previously app was build with API version set as target sdk

EDIT

After closer look I think this is broken. It is basically not saved neither in project.properties nor elsewhere, therefore it does not really serve described purpose, outside "New Project Wizard", which will generate code/layout stubs to match "compile with" API version.

Filled bug report: http://code.google.com/p/android/issues/detail?id=40286

like image 97
Marcin Orlowski Avatar answered Oct 10 '22 03:10

Marcin Orlowski