gpt4 book ai didi

android - 是否需要在 android list 中设置最大值?

转载 作者:太空狗 更新时间:2023-10-29 13:10:49 25 4
gpt4 key购买 nike

我的 ionic 应用程序的目标是 24,最小 16,android list 中没有最大值。

当我在设置为 24 或 25 的设备上运行 firebase 时,我遇到了致命的崩溃。

我的应用是否需要最大值以避免崩溃?或者这会限制它在较新的 API 设备上的支持吗?

同样在 Android studio 中,当您第一次尝试设置项目并选择目标时,它会告诉您游戏商店中有 __% 的人使用该目标,因此 24 小于 1%。那么,如果我的目标是 24,是否意味着商店中只有 1% 的人能够使用我的应用程序?

这是我的 API 23 应用程序在 25 设备上的崩溃: enter image description here

API 24 应用程序在 24 位设备上崩溃: enter image description here

最佳答案

我看你有点糊涂了,我们先搞清楚它们对Android意味着什么。

android:targetSdkVersion

有了这个,您就可以告诉 Android 您的目标是哪个 SDK。重要的是它告诉系统 SDK 级别匹配此属性,系统不需要启用任何行为来保持兼容性。

您的应用仍然可以在旧版本(低至 minSdkVersion)上运行。

android:minSdkVersion

正如属性名称所暗示的那样,这是运行该应用程序所需的最低 SDK 版本,如果尝试安装该应用程序的设备具有较低的 SDK 版本,系统将阻止该过程。

需要注意的是,如果您在更新中提高了 minSdkVersion,所有已经安装了该应用且没有登录者匹配此属性的用户将无法再使用该应用

android:maxSdkVersion

再一次,属性名称说明了一切。这是设备可以运行该应用程序的 maxium SDK 版本。

请注意文档中的这一点:

An application declaring maxSdkVersion="5" in its manifest ispublished on Google Play. A user whose device is running Android 1.6(API Level 4) downloads and installs the app. After a few weeks, theuser receives an over-the-air system update to Android 2.0 (API Level5). After the update is installed, the system checks the application'smaxSdkVersion and successfully re-validates it. The applicationfunctions as normal. However, some time later, the device receivesanother system update, this time to Android 2.0.1 (API Level 6). Afterthe update, the system can no longer re-validate the applicationbecause the system's own API Level (6) is now higher than the maximumsupported by the application (5). The system prevents the applicationfrom being visible to the user, in effect removing it from the device.

就是这样。 Check also the DOCS here


Also in Android studio when you first try to set a project and pick atarget it tells you that __% of people in the play store use thattarget so 24 is less than 1%. So if my target is 24 does that meanonly 1% of the store will be able to use my app?

实际上不是,您必须考虑最小值和最大值才能确定有多少百分比的市场能够使用您的应用程序。这只是说有多少人(%)拥有该 SDK 版本。


关于崩溃

我很确定问题与 SDKVersion 无关,也许您应该发布一些日志以便给出更详细的答案。

希望对你有帮助:)

关于android - 是否需要在 android list 中设置最大值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41266552/

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