gpt4 book ai didi

Android Min SDK Version 和 Max SDK Version 设置

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:46:10 24 4
gpt4 key购买 nike

我有一个应用程序,我只想安装在 ICS 上。所以我设置了最小和最大 sdk 版本如下。

<uses-sdk android:minSdkVersion="14" android:maxSdkVersion="15" />

理想情况下这应该有效。但是一些它如何能够安装在 Jellybean 版本上。工业化学品(API 14-15)果冻 bean (API 16-18)

我在这里错过了什么?请帮忙

最佳答案

根据documentation :

Future versions of Android (beyond Android 2.0.1) will no longer check or enforce the maxSdkVersion attribute during installation or re-validation. Google Play will continue to use the attribute as a filter, however, when presenting users with applications available for download.

看到的行为是预期的。但是,如果您发布到 Google Play,该应用程序将被过滤。

除非您有一些功能绝对只需要较旧的 API(想到飞行模式),否则这样的限制没有多大用处。

如果您担心非 Google Play 来源或用户旁加载该应用,您始终可以对 Android 版本进行运行时检查并限制功能或关闭该应用。

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLYBEAN){
//do something about the Android version being too new
}

请记住,如果您希望您的应用覆盖最大的用户群,您将不得不在某个时候解决由新 Android 版本引起的问题。

关于Android Min SDK Version 和 Max SDK Version 设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21104936/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com