Difference between “Build Target SDK” in Eclipse and android:targetSdkVersion in AndroidManifest.xml?

后端 未结 7 513
伪装坚强ぢ
伪装坚强ぢ 2020-12-05 02:55

As I\'m importing an existing Android project into Eclipse, I am asked to select an SDK build target as part of the process.

Why do I need to enter this information?

7条回答
  •  天涯浪人
    2020-12-05 03:43

    I'm not saying Eclipse's build target should be set to something less than minSdkVersion. I'm asking why Eclipse doesn't automatically use either minSdkVersion or targetSdkVersion as its build target SDK instead. Why would you ever want to set it to something different?

    call it a feature. eclipse is not made exclusively for android. if nobody thought of adding a automatism to use the sdk version given in the manifest, then eclipse simplely wont do it. i dont think there's much magic behind this. i think it has just not been added yet to eclipse / android plugin for eclipse features.

    also, since you allways may change the sdk version stated in the manifest, it makes perfectly sense to also be flexible in eclipse (you always can change the eclipse sdk target via the properties of your project). like others posted there are times when the manifest sdk may differ from the eclipse sdk. (multi sdk-version support). using a lower then the min-sdk in manifest makes no sense of course but here gain: if nobody wrote yet a checker for the eclipse plugin that checks if what you're doing makes sense, then it simply will be possible.

提交回复
热议问题