Cordova/android compile error with crosswalk
Asked Answered
T

2

8

I have an android/cordova project that uses crosswalk. When I try to build, I have the following error:

:processArmv7DebugManifest/app/platforms/android/AndroidManifest.xml:31:5-74 Error:
    uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [org.xwalk:xwalk_core_library:20.50.533.12] /app/platforms/android/build/intermediates/exploded-aar/org.xwalk/xwalk_core_library/20.50.533.12/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:20.50.533.12] /app/platforms/android/build/intermediates/exploded-aar/org.xwalk/xwalk_core_library/20.50.533.12/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

But i have ver17 set in my config.xml:

   <preference name="android-minSdkVersion" value="17" />
    <preference name="android-targetSdkVersion" value="17" />

Furthermore, it is the same in the platforms/android/AndroidManifest.xml:

<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="17" />

I tried to remove and then add back again the crosswalk and "platform android" itself, but error still persists.

Please help

Thousandfold answered 22/8, 2016 at 0:2 Comment(0)
E
3

This seems to be an issue with the new Crosswalk version whrere they canceled support for older Andorid APIs. Changing the Crosswalk version in config.xml to the prior version 19 solved the issue for me

<preference name="xwalkVersion" value="19" />
Emmalineemmalyn answered 22/8, 2016 at 10:29 Comment(2)
Yes, thank you, I just forgot to mention, I did that and got the runtime error then. When app starts it immediately quit with the "Unexpected error" or sonething alike. Actually, I just removed xwalk and then added it back with the following command: cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="19" what, I suppose, is the sameThousandfold
Found that it happens in android 5+. Android 4 works just fine with xwalk 19. Have no idea what to do.Thousandfold
B
3

Try building with the minSdkVersion flag:

cordova build android -- --minSdkVersion=16

Note the double -- is intentional

Backsaw answered 5/10, 2016 at 22:18 Comment(1)
indeed it works (cordova 6.4 + [email protected]) but would be nice to have it persisted on config.xmlTattler

© 2022 - 2024 — McMap. All rights reserved.