Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUILD FAILURE: Manifest Merger Failed #752

Closed
3 tasks done
willnix86 opened this issue Jun 25, 2019 · 9 comments
Closed
3 tasks done

BUILD FAILURE: Manifest Merger Failed #752

willnix86 opened this issue Jun 25, 2019 · 9 comments

Comments

@willnix86
Copy link

willnix86 commented Jun 25, 2019

Bug Report

Problem

Can't build Android project.

What is expected to happen?

Setting 'minSdkVersion' to 19 in the root config.xml should set the minSdk to 19 in the app.

What does actually happen?

Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 19 declared in library [:CordovaLib] myProject/platforms/android/CordovaLib/build/intermediates/library_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 14
Suggestion: use a compatible library with a minSdk of at most 14,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)

Information

I have checked every single file in my project (including all plugins) and nowhere is the sdk version being overwritten. I have checked in all the Android projects folder after build and all I can see is references to sdk 19.

I do however, see cdvMinSdkVersion=14 in gradle.properties (Project Properties), so I guess the question is, where's that being set and why is it not overwritten?

Environment, Platform, Device

Using Cordova Android 8.0.0
Using Cordova 9.0.0
Using global Gradle 4.1

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@breautek
Copy link
Contributor

Cordova's config xml doesn't have a minSdkVersion option, I think you might mean android-minSdkVersion?

Documentation Reference

Also worth noting that Cordova doesn't support API levels < 19 when using Android platform 8. More info here

@willnix86
Copy link
Author

willnix86 commented Jun 26, 2019 via email

@breautek
Copy link
Contributor

Interesting...

so <preference name="android-minSdkVersion" value="21"/> doesn't work but...

In a build-extras.gradle, i have:
ext.cdvMinSdkVersion = 21

does?

@willnix86
Copy link
Author

willnix86 commented Jun 26, 2019 via email

@breautek
Copy link
Contributor

I cannot find anywhere that’s making any reference to setting the minSdk to 14

A plugin could be doing this. If possible, I'd make a minimal reproducible project including only what is necessary to reproduce this issue. I'm willing to bet it will isolate the issue to a specific plugin.

@breautek
Copy link
Contributor

This issue may be related to #599

@willnix86
Copy link
Author

I tentatively say that the sdk issue is fixed now, but let me run a few more builds to make sure.

Another issue has arisen now, in that I get the following errors once the app has installed:

Failed to load resource: net::ERR_FILE_NOT_FOUND: cordova_plugins.js:1

Any thoughts on that one?!

@breautek
Copy link
Contributor

Nope... Never seen that one before. I'd recommend creating a new issue to keep things organised if the issue persists.

@willnix86
Copy link
Author

This issue seems to have resolved itself too. Unsure if it was the fault of one or more plugins but, either way, we're all good. Thanks for the help @breautek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants