Kivy应用Buildozer配置android.api版本相关问题咨询
Kivy应用适配Android API 33相关问题
背景情况
我开发了一款Kivy应用,此前在buildozer init中使用android.api 31和32版本均无问题。今日尝试使用android.api 33生成签名后的aab文件并提交Google Play Console更新时,收到如下错误:
Your app targets Android 13 (API 33) or above. You must declare the use of advertising ID in Play Console. Complete Declaration
对应的声明内容:
Does your app use advertising ID? This includes any SDKs that your app imports that use advertising ID No Yes When you answer this question, make sure to verify if any third-party SDK code in your app uses advertising ID. If so, you must declare that your app uses it. Some SDKs, such as the Google Mobile Ads SDK (Play Services-ads) may already declare the com.google.android.gms.permission.AD_ID permission in the SDK's library manifest. If your app uses these SDKs as dependencies, the com.google.android.gms.permission.AD_ID permission from the SDK's library manifest will be merged with your app's main manifest by default, even if you don't explicitly declare the permission in your app's main manifest. Learn more
疑问与解答
1. 广告ID声明选择问题
- 若应用完全无广告,且未引入任何会使用广告ID的第三方SDK(比如AdMob类广告SDK),直接选No即可。后续如果集成AdMob这类依赖广告ID的SDK,再改成Yes。
- 需确认所有依赖SDK均不涉及广告ID,可检查最终生成的Manifest文件是否包含
com.google.android.gms.permission.AD_ID权限,若有则必须选Yes,或通过配置移除该权限。
2. Android API 33的兼容范围问题
android.api 33指应用的**目标SDK版本(targetSdkVersion)**为33,即最高适配Android 13,并非只能在Android 13上运行。- 只要在Buildozer配置中设置
android.minapi(比如设为21对应Android 5.0),应用就能兼容Android 5.0及以上系统。目标SDK版本仅说明应用针对该版本做了优化,低版本系统仍可正常运行,除非使用了高版本专属API且未做兼容处理。
3. 兼容低版本的API选择问题
- API 33本身支持低版本,只要配置好
android.minapi就无需更换。若确实不想使用API 33,选API 32或31均可,两者兼容范围基本一致,都能支持Android 5.0及以上(前提是minapi设置正确)。但Google Play现已要求新应用目标SDK版本至少为API 33,后续应用更新也会逐步强制升级,因此建议优先保留API 33,配置好minapi即可。
内容的提问来源于stack exchange,提问作者user21099627
相关产品推荐
相关产品推荐

