【发布时间】:2020-11-17 10:26:01
【问题描述】:
之前我们在 config.xml 中使用 Android API 级别 28 和 minSdkVersion 为 19,并且该应用程序在 Play 商店中可用。最近我们更新了 android 版本(通过删除和添加最新的 android 作为 google play 控制台,要求 android 高于 API 级别 29)。 Bu做这个离子构建给出了以下错误:
Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 22 declared in library [:CordovaLib] D:\MobileApp\MyApp\platforms\android\CordovaLib\build\intermediates\library_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 19
Suggestion: use a compatible library with a minSdk of at most 19,
or increase this project's minSdk version to at least 22,
or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)
由于这个应用程序可以在手机中更新。请建议是否有任何方法可以将 19 作为 minSdkVersion。
谢谢!
【问题讨论】:
-
在您的 config.xml 中添加
<preference name="android-minSdkVersion" value="22" /> -
我添加了这个,并且构建在 API 级别 >= 22 的手机上运行,但是很少有手机的 android 版本较低,因此无法使用该应用程序。
标签: android-studio ionic-framework android-min-sdk