我最近升级了Cordova-Android到版本12,我的应用程序不再构建,我得到以下错误
uses-sdk:minSdkVersion 19不能小于库中声明的version 21
我知道我需要将我的最小版本提高到21或更高,我已经在我的config.xml文件中完成了:-
<platform name="android">
...
<preference name="android-minSdkVersion" value="24" />
...
</platform>
我已经删除和添加平台无数次,我仍然得到一个失败的建设与上述错误。我在谷歌上搜索的所有内容都以相同的答案结束(在config.xml文件中更改android-minSdkVersion版本)。
我拉我的头发,因为我相信这是一些明显的我错过了,感谢任何帮助,如果你需要更多的信息(插件使用等,然后让我知道)。
完整错误:
> Task :app:processDebugMainManifest FAILED
C:\www\cordova\app\platforms\android\app\src\main\AndroidManifest.xml Error:
uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library [androidx.core:core-splashscreen:1.0.0] C:\Users\user\.gradle\caches\transforms-3\8fa35d5508191c4f9f8ca09de1273d1b\transformed\jetified-core-splashscreen-1.0.0\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 21,
or use tools:overrideLibrary="androidx.core.splashscreen" to force usage (may lead to runtime failures)
See https://developer.android.com/r/studio-ui/build/manifest-merger for more information about the manifest merger.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library [androidx.core:core-splashscreen:1.0.0] C:\Users\user\.gradle\caches\transforms-3\8fa35d5508191c4f9f8ca09de1273d1b\transformed\jetified-core-splashscreen-1.0.0\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 21,
or use tools:overrideLibrary="androidx.core.splashscreen" to force usage (may lead to runtime failures)
1条答案
按热度按时间tag5nh1u1#
您可能已经在gradle构建配置中设置了最小sdk版本。请参阅https://developer.android.com/build/gradle-tips#combine-multiple-product-flavors,其中显示了在gradle文件中使用
minSdkVersion
。