android - 如何从 config.xml 为 phonegap 定位 android 的 API 级别?
问题描述
我曾经使用基本的 config.xml 文件为 play store 的 phonegap 构建应用程序,直到最近我的应用程序被拒绝,因为它们没有针对 API 级别 26。我做了一些研究并尝试了一些解决方案并做到了这一点:
<platform name="android">
<allow-intent href="market:*" />
<preference name="android-minSdkVersion" value="26" />
<preference name="android-targetSdkVersion" value="26" />
</platform>
情况变得越来越糟,我在调试模式下的应用程序(在 phonegap 构建上进行了 xompilation 之后)甚至不会在 android 上被解析。
我同样阅读了几个解决方案,但似乎没有一个能走。我真的只是想知道我应该在 config.xml 文件中包含什么,以便我可以重新开始。
解决方案
我的 config.xml 文件有这两行,但它们放在外面
<platform name="android"></platform>
以下是我使用的值,并且我的应用程序在 Apple 和 Google 应用程序商店中都存在:
<preference name="android-targetSdkVersion" value="26" />
<preference name="android-minSdkVersion" value="14" />
如果您想要我的完整 config.xml 文件的示例,请告诉我!:)
推荐阅读
- python - Beautifulsoup 正在返回双链接
- jquery - 没有缓存 jQuery 文件时,网站加载速度更快?
- java - Apache http客户端自签名证书
- angular - 滚动时底部垫子工具栏闪烁
- unity3d - 如何使用 DOTS 生成单位?
- rest - 在 Loopback 4 中一起过滤 'or' 和 'and'
- spring-boot - Websocket:意外的响应代码:302
- ios - 在 Storyboard 中的视图之间切换
- snowflake-cloud-data-platform - 为什么雪花 LAST_QUERY_ID 返回 NULL?
- java - 在春季使用 mongodb 聚合展平嵌套数组