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

后端 未结 7 505
伪装坚强ぢ
伪装坚强ぢ 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:29

    AFAIK, the android:minSdkVersion and the one that the Eclipse asks you to select while setting up a project are one and the same. However, the android:targetSdkVersion is where you'd want your app to target a specific sdk version of Android available in the market.

    For example, you might have your android:minSdkVersion="8" (the one that Eclipse asks you during setting up of your project) because you'd want your app to run on devices that have Froyo also (along with higher versions of Android). But you might want your app to truly target GingerBread users or HoneyComb users or ICS users.

    EDIT : Please do keep in mind that your targetSdkVersion has to be equal to or more than that of the minSdkVersion. Otherwise, it doesn't really make much sense.

提交回复
热议问题