gpt4 book ai didi

Android min sdk requirements for playstore(Playstore的Android最小SDK要求)

转载 作者:bug小助手 更新时间:2023-10-28 22:34:48 28 4
gpt4 key购买 nike



I am a university student and need to make an android app that will work on Kitkat Android phones. Currently the min sdk is 21 but I need to change it to 19 to accommodate Kitkat phones. But doing some research I have found that sdk 19 is no longer supported on the Google Play services. So my understanding is that it is simply not possible or is my understanding incorrect and there is a way to do this?

我是一名大学生,需要做一个Android应用程序,将在Kitkat Android手机上工作。目前最小SDK是21,但我需要将其更改为19,以适应Kitkat手机。但在做了一些研究后,我发现Google Play服务不再支持SDK 19。所以我的理解是,这根本是不可能的,或者我的理解是错误的,有办法做到这一点?


The reason for this change to sdk 19 is to accommodate the phone versions of farmers who don't have the latest phones and android versions. (I am making an app for subsistence farmers)

SDK 19的这一变化是为了适应没有最新手机和Android版本的农民的手机版本。(我正在为自给自足的农民制作一款应用程序)


I am using these sites for my references in case any one asks where I get my info from:
https://apilevels.com/

https://android-developers.googleblog.com/2023/07/google-play-services-discontinuing-updates-for-kitkat.html#:~:text=As%20of%20July%202023%2C%20the,99.

我使用这些网站作为参考,以防有人问我从哪里获得我的信息:https://apilevels.com/https://android-developers.googleblog.com/2023/07/google-play-services-discontinuing-updates-for-kitkat.html#:~:text=As%20of%20July%202023%2C%20the,99.


In android studio I tried changing the min sdk level to 19 in the manifest, gradle as well as the project structure. It resulted in countless building errors.

在Android工作室中,我尝试在清单、Gradle以及项目结构中将最小SDK级别更改为19。它导致了无数的建筑错误。


更多回答
优秀答案推荐

Google discontinued support for KitKat, but that doesn't mean that the Google Play services do not work on it. Cutting support means it won't receive any more updates, given how few phones that use KitKat nowadays are.

谷歌停止了对KitKat的支持,但这并不意味着Google Play服务不能在它上面工作。削减支持意味着它不会收到更多更新,因为现在使用KitKat的手机太少了。


However, Google cares more about your targetSdk especially if you're willing to upload your app to the play store. As of August 2023, it needs to target at least API-33. Google Play store does NOT care about your minSdk version. Many open-source apps such as Briar still support KitKat, it is uploaded to the store just fine.

然而,谷歌更关心你的Target Sdk,特别是如果你愿意将你的应用程序上传到Play商店的话。截至2023年8月,它需要至少瞄准API-33。Google Play商店不关心你的minSdk版本。许多开源应用程序,如Briar,仍然支持KitKat,它上传到商店也很好。


Keep in mind that you need some additional libraries such as the "multi-dex" library which will make your build compatible with SDKs lower than 21 (Lollipop). Any app that has minSdk lower than 19 needs to implement multidex library. The guide can be found here: Multidex support

请记住,您需要一些额外的库,如“多点”库,它将使您的版本与低于21(棒棒糖)的SDK兼容。任何minSdk低于19的应用程序都需要实现Multidex库。可在此处找到指南:Multidex Support


Other than that, if there are any other build errors that you're encountering, please edit your post accordingly. Android Studio (including the stable, beta, or canary builds) should be able to support any minSdk version even KitKat, so I assume you need to work on fixing your gradle files until you get rid of errors. Once your build becomes error-free, don't worry about your minSdk anymore.

除此之外,如果您遇到任何其他构建错误,请相应地编辑您的帖子。Android Studio(包括稳定版、测试版或金丝雀版)应该能够支持任何minSdk版本,甚至包括KitKat,所以我假设你需要努力修复Gradle文件,直到你消除错误。一旦您的构建变得没有错误,就不必再担心minSdk了。


Make sure you use AndroidX libraries for maximum backward-compatibility. Such as AndroidX's appcompat and AndroidX's core libraries. This will ensure optimal consistency in behavior across all Android versions (as long as you implement the Compat code of those libraries). Anything with "androidx" in it means it supports backward compatibility.

确保使用androidX库以实现最大的向后兼容性。如androidX的appCompat和androidX的核心库。这将确保所有Android版本之间行为的最佳一致性(只要您实现这些库的Compat代码)。任何带有“androidx”的内容都意味着它支持向后兼容。


更多回答

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