【问题标题】:Ionic cordova compile for android giving error on minSdkVersion smaller than version declaredIonic cordova compile for android 在 minSdkVersion 上给出的错误小于声明的版本
【发布时间】:2018-10-22 18:39:10
【问题描述】:

请帮忙,

我试图将我的 android 平台版本更新到 7.1.0,但出现了很多问题,所以我决定放回 6.3.0 版本,但是当我尝试编译时,我无法再编译了Android 这就是我得到的错误:

:processArmv7DebugManifest
/Users/francisco/ionic-projects/jungery2/platforms/android/AndroidManifest.xml:52:5-74 Error:

    uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [org.xwalk:xwalk_core_library:23.53.589.4] /Users/francisco/ionic-projects/jungery2/platforms/android/build/intermediates/exploded-aar/org.xwalk/xwalk_core_library/23.53.589.4/AndroidManifest.xml
    Suggestion: use tools:overrideLibrary="org.xwalk.core" to force usage


See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

:processArmv7DebugManifest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processArmv7DebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [org.xwalk:xwalk_core_library:23.53.589.4] /Users/francisco/ionic-projects/jungery2/platforms/android/build/intermediates/exploded-aar/org.xwalk/xwalk_core_library/23.53.589.4/AndroidManifest.xml
    Suggestion: use tools:overrideLibrary="org.xwalk.core" to force usage


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 15.71 secs

Error: /Users/francisco/ionic-projects/jungery2/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Users/francisco/ionic-projects/jungery2/platforms/android/AndroidManifest.xml:52:5-74 Error:
    uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [org.xwalk:xwalk_core_library:23.53.589.4] /Users/francisco/ionic-projects/jungery2/platforms/android/build/intermediates/exploded-aar/org.xwalk/xwalk_core_library/23.53.589.4/AndroidManifest.xml
    Suggestion: use tools:overrideLibrary="org.xwalk.core" to force usage

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processArmv7DebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [org.xwalk:xwalk_core_library:23.53.589.4] /Users/francisco/ionic-projects/jungery2/platforms/android/build/intermediates/exploded-aar/org.xwalk/xwalk_core_library/23.53.589.4/AndroidManifest.xml
    Suggestion: use tools:overrideLibrary="org.xwalk.core" to force usage

我不确定在哪里可以找到这个: minSdkVersion 15

编辑 1:

> cordova plugin ls
com.googlemaps.ios 2.7.0 "Google Maps SDK for iOS"
com.telerik.plugins.nativepagetransitions 0.6.5 "Native Page Transitions"
cordova-plugin-add-swift-support 1.7.2 "AddSwiftSupport"
cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-contacts 3.0.1 "Contacts"
cordova-plugin-crosswalk-webview 2.4.0 "Crosswalk WebView Engine"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-email-composer 0.8.15 "EmailComposer"
cordova-plugin-facebook4 1.10.1 "Facebook Connect"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-globalization 1.11.0 "Globalization"
cordova-plugin-googleplus 5.3.2 "Google SignIn"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.1.4 "cordova-plugin-ionic-webview"
cordova-plugin-linkedin 1.2.1 "LinkedIn"
cordova-plugin-mauron85-background-geolocation 2.3.6 "CDVBackgroundGeolocation"
cordova-plugin-media 5.0.2 "Media"
cordova-plugin-nativeaudio 3.0.9 "Cordova Native Audio"
cordova-plugin-nativegeocoder 2.0.5 "NativeGeocoder"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-streaming-media 2.1.3 "StreamingMedia"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.4.1 "SocialSharing"
cordova-sqlite-storage 0.7.14 "Cordova sqlite storage plugin"
es6-promise-plugin 4.2.2 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-barcodescanner 6.0.8 "BarcodeScanner"
phonegap-plugin-push 2.2.3 "PushPlugin"
twitter-connect-plugin 0.6.0 "Twitter Connect"

编辑 2:

Error: /Users/francisco/ionic-projects/jungery2/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/Users/francisco/ionic-projects/jungery2/platforms/android/res/xml/authenticator.xml:2:81-93: AAPT: No resource found that matches the given name (at 'icon' with value '@mipmap/icon').

/Users/francisco/ionic-projects/jungery2/platforms/android/res/xml/authenticator.xml:2:147-159: AAPT: No resource found that matches the given name (at 'smallIcon' with value '@mipmap/icon').

/Users/francisco/ionic-projects/jungery2/platforms/android/build/intermediates/res/merged/armv7/debug/xml/authenticator.xml:2: error: Error: No resource found that matches the given name (at 'icon' with value '@mipmap/icon').

/Users/francisco/ionic-projects/jungery2/platforms/android/build/intermediates/res/merged/armv7/debug/xml/authenticator.xml:2: error: Error: No resource found that matches the given name (at 'smallIcon' with value '@mipmap/icon').



FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processArmv7DebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

有人可以帮忙吗?

【问题讨论】:

    标签: android cordova compiler-errors ionic3


    【解决方案1】:

    在我看来,您的人行横道插件版本在此过程中发生了变化。如果您可以检查升级/降级之前的版本(在您的 config.xml 中),那么您可以显式安装您曾经拥有的版本。如果您碰巧没有将其置于源代码控制之下,那么在我看来,16 的 minSdkVersion 已添加到 Crosswalk 版本 2.0.0 中。如果您不得不猜测您曾经拥有的版本,请尝试 1.8.0(或更早)之类的版本。

    更新 基于条形码扫描仪 cmets,我会尝试以下两个选项之一:

    1. 在您的 config.xml 中添加 >=16 的最低 SDK 版本。如果您将其设置为 >=16,则条码扫描器插件看起来可能不会覆盖它。 <preference name="android-minSdkVersion" value="16" />

    2. 尝试将条码扫描器更新到 7.1+

    【讨论】:

    • 感谢您的回答,正如您在我的“编辑 1”中看到的那样,我的人行横道是 2.4.0,但它始终是那个版本,但是 minSdkVersion 15 来自哪里?我搜索了整个项目,一无所获。
    • 假设它不在您的 config.xml 中,我猜这将是您正在拉入的插件之一。当您进行搜索时,您是否包含了 plugins 文件夹?
    • 似乎问题出在其他地方,正如您在此处看到的那样:crosswalk-project.org/jira/browse/XWALK-7284 - 一定是关于条形码扫描仪的问题,我之前遇到过这个插件的问题,不知道我当时做了什么。
    • 是的,我也注意到了。这可能会给你一些提示:stackoverflow.com/questions/37293082/…
    • 我删除了人行横道插件,我能够成功使用“cordova compile”,然后我再次添加插件并再次成功运行“cordova compile”,然后我运行“cordova clean”并尝试再次运行“cordova compile”,如果您对错误有任何想法,请查看我的 Edit 2 并查看结果。
    猜你喜欢
    • 2018-03-12
    • 1970-01-01
    • 2021-03-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多