【问题标题】:Error build ionic/cordova Android API 10错误构建 ionic/cordova Android API 10
【发布时间】:2016-07-04 00:20:09
【问题描述】:

我在编译我的项目 ionic/cordova (6) 时发现了问题,查看了 AndroidManifest.xml(platforms\android) 并且设置正确。

在 AndroidManifest.xml(platforms\android\build\intermediates\exploded-aar\android\CordovaLib\unspecified\debug) 我属性 minsdk 10 但是当我构建项目时它会覆盖 14

我添加了我的 config.xml 首选项 name="android-minSdkVersion" value="10" 但不起作用....

我添加了我的清单工具:overrideLibrary 但不起作用...

Manifest merger failed : uses-sdk:minSdkVersion 10 cannot be smaller than version 14 declared in library [android:CordovaLib:unspecified:debug] D:\XX\platforms\android\build\intermediates\exploded-aar\android\CordovaLib\unspecified\debug\AndroidManifest.xml
1>      Suggestion: use tools:overrideLibrary="org.apache.cordova" to force usage
1>
.....................
1>
1>  * Try:
1>  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
1>MDAVSCLI : Java HotSpot(TM) 64-Bit Server VM warning : ignoring option MaxPermSize=512m; support was removed in 8.0

【问题讨论】:

    标签: android cordova ionic-framework visual-studio-cordova


    【解决方案1】:

    我遇到了同样的问题,即使通过一些修复我可以编译一个 apk,但它在 Android api 10 的设备上无法正常运行。

    原因是根据文档,如果您使用的是 Cordova 版本 6,您可能无法为 Android API 10 构建正确的 apk 您应该改用 Cordova 4.0.X。

    https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html

    【讨论】: