Repository navigation
"One or more plugins require a higher Android SDK/NDK version" – tell me what these plugins are #147806
Copy link
Copy link
Closed
Labels
c: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterplatform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versiont: gradle"flutter build" and "flutter run" on Android"flutter build" and "flutter run" on Androidteam-androidOwned by Android platform teamOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
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):
-
flutter create --platforms=android example -
Add some plugins to
pubspec.yaml:dependencies: firebase_core: ^2.30.1 location: ^6.0.1
-
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.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterplatform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versiont: gradle"flutter build" and "flutter run" on Android"flutter build" and "flutter run" on Androidteam-androidOwned by Android platform teamOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Activity
[-]"One or more plugins require a higher Android NDK version" – tell me what plugins[/-][+]"One or more plugins require a higher Android SDK/NDK version" – tell me what these plugins are[/+]huycozy commentedon May 6, 2024
Hi @bartekpacia, this change makes sense but I couldn't reproduce the issue.
In the first build, I faced
incompatible version of Kotlinissue withlocation-6.0.1plugin, I had to change it from 1.7.10 to 1.9.0.Then when I built the project again, it was successful without NDK version issue. I wonder if there is any more step to reproduce this?
bartekpacia commentedon May 6, 2024
@huycozy You're right, sorry. I must've missed something.
But for sure this test reproduces this problem.
huycozy commentedon May 7, 2024
Yes, it's obvious through that test. Marking this as a proposal for this improvement.
Improve Android SDK and NDK mistmatch warning message (#147809)
github-actions commentedon May 22, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.