How to change Android minSdkVersion in Flutter Project

0 votes

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?

Mar 20, 2023 in Flutter by Ashwini
• 5,430 points

1 answer to this question.

0 votes

Yes, you can change the minSdkVersion in your Flutter project by modifying the build.gradle file located in the android/app directory. Here's how you can do it:

  1. Open the build.gradle file in your project.
  2. Find the minSdkVersion field and change its value to the desired minimum Android SDK version, such as 19 in your case.
  3. Save the file.

After making this change, you may need to run flutter clean to rebuild your app with the updated minSdkVersion. Additionally, be aware that changing the minSdkVersion may affect the compatibility of your app with older devices, so make sure to test your app thoroughly after making this change.

To know more, join our Flutter Certification Course today.

answered Mar 21, 2023 by Tej

Related Questions In Flutter

0 votes
1 answer

How to implement drop down list in flutter?

You're close! The error you're getting is ...READ MORE

answered Mar 26, 2023 in Flutter by vishalini
0 votes
1 answer

How to dynamically resize text in Flutter?

You can use the FittedBox widget to ...READ MORE

answered Mar 27, 2023 in Flutter by Tej
0 votes
1 answer

How to present an empty view in flutter?

In Flutter, you can present an empty ...READ MORE

answered Mar 27, 2023 in Flutter by anonymous
0 votes
1 answer
0 votes
1 answer

What are some advantages of Flutter?

Hi@akhtar, Nowadays Flutter is taking the market. It ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,440 points
0 votes
1 answer

'git rev-parse HEAD' is not recognized as an internal or external command

Hi@akhtar, I also faced the same problem. You ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,440 points
+1 vote
3 answers

Flutter plugin not installed; this adds Flutter specific functionality.

Here Is All Possible Solution Added Flutter ...READ MORE

answered Dec 16, 2020 in Others by Blogging
• 140 points
0 votes
1 answer

How to change flutter project name and id?

Yes, it is possible to change the ...READ MORE

answered Mar 20, 2023 in Flutter by pooja
0 votes
2 answers

How to create a circle icon button in Flutter?

To create something similar to a FloatingActionButton, ...READ MORE

answered Aug 23, 2023 in Flutter by anonymous
• 140 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP