Skip to content

"One or more plugins require a higher Android SDK/NDK version" – tell me what these plugins are #147806

@bartekpacia

Description

@bartekpacia

Steps to reproduce

This error message could've been more helpful, i.e. mention specifically which plugins require higher NDK version:

$ flutter build apk --debug

One or more plugins require a higher Android NDK version.
Fix this issue by adding the following to /Users/bartek/projects/example/android/app/build.gradle:
android {
  ndkVersion "25.1.8937393"
  ...
}

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Expected results

$ flutter build apk --debug

Your project is configured with Android NDK 23.1.7779620, but the following plugin(s) require a higher Android NDK version:
- firebase_core requires 25.1.8937393
- location requires 25.1.8937393
Fix this issue by adding the following to /Users/bartek/projects/example/android/app/build.gradle:
android {
  ndkVersion "25.1.8937393"
  ...
}

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Reproduction

I'm using Flutter from master branch (~May 3rd, 2024):

  1. flutter create --platforms=android example

  2. Add some plugins to pubspec.yaml:

    dependencies:
      firebase_core: ^2.30.1
      location: ^6.0.1
  3. flutter build apk --debug

Flutter Doctor output

Doctor output
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 3.22.0-23.0.pre.30, on macOS 14.4.1 23E224 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 15.3)
    ✗ Unable to get list of installed Simulator runtimes.
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2023.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.1.1)
[✓] VS Code (version 1.89.0)
[✓] Connected device (2 available)
[✓] Network resources

! Doctor found issues in 2 categories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: proposalA detailed proposal for a change to Flutterplatform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versiont: gradle"flutter build" and "flutter run" on Androidteam-androidOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions