简体   繁体   English

如何为Android选择正确的API级别与 <uses-sdk /> AndroidManifest.xml中的属性?

[英]How choosing the right API level for Android is related to <uses-sdk /> property in AndroidManifest.xml?

I need my Android device to run on Ice Cream Sandwich, Jelly Bean, KitKat (and if not very painful on Gingerbread). 我需要我的Android设备在Ice Cream Sandwich,Jelly Bean,KitKat上运行(如果不是非常痛苦,则可以在Gingerbread上运行)。 I've got confused founding two properties to set: 我对建立两个属性感到困惑:

  1. Choosing API level (as I've read the device will not be able to run my app, if it uses lower API); 选择API级别(如我所读,如果设备使用较低的API,则它将无法运行我的应用);
  2. <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19"/> in AndroidManifest.xml <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19"/>

How these two setting are related? 这两个设置如何关联?

As I know I can choose only one API in project->Android settings but the uses SDK needs a range. 据我所知,我只能在“项目”->“ Android”设置中选择一个API,但使用SDK需要一个范围。 Can you explain that? 你能解释一下吗?

And do you think, it's still worth to make the app available for GingerBread? 而且您认为,仍然值得将该应用程序用于GingerBread吗? Or this version is already too old - 15% are still using it - but from the GUI point isn't it too old/not comfortable? 或者此版本已经太旧了-15%仍在使用它-但从GUI角度来看,它是否太旧/不舒服?

There's a minimum and a target version. 有一个最低版本和一个目标版本。 The minimum must be equal to or below the lowest version of phone you want to use this program. 最小值必须等于或低于您要使用此程序的手机的最低版本。 For your purposes, 11. The target is the version you claim to support, so if Android has any compatibility issues it knows how to act. 出于您的目的,11.目标是您声称支持的版本,因此,如果Android存在任何兼容性问题,它将知道如何执行。 It must be equal to or higher than the minimum. 它必须等于或大于最小值。 Basically set this to whatever version you tested and built against. 基本上将其设置为您测试和构建的任何版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM