How to change Android minSdkVersion in flutter project

I was trying to start a flutter project for an App using bluetooth to communicate. For that, I was using flutter blue.

Unfortunately, when trying to run (on an Android device) the first example I created I was met with the following error:

FAILURE: Build failed with an exception.

  * What went wrong:
  Execution failed for task ':app:processDebugManifest'.
  > Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:flutter_blue] /home/maldus/Projects/flutter/polmac/build/flutter_blue/intermediates/manifests/full/debug/AndroidManifest.xml as the library might be using APIs not available in 16
    Suggestion: use a compatible library with a minSdk of at most 16,
            or increase this project's minSdk version to at least 19,
            or use tools:overrideLibrary="com.pauldemarco.flutterblue" to force usage (may lead to runtime failures)

If I were on Android Studio, I’d know how to bump up the Android minSdkVersion, but on a flutter project (using VSCode) I was a little lost.

Is it possible to increase the minSdkVersion with flutter, and how?

17 Answers
17

Leave a Comment