Select to view content in your preferred language

Android NDK version to use

4166
6
Jump to solution
05-06-2025 03:27 AM
EgorFedorov
Regular Contributor

Installation instructions in pub.dev says setting Android NDK to 25.2.9519653, and in turn sample app uses 27.0.12077973. What version is preferable? Any essential difference?

0 Kudos
1 Solution

Accepted Solutions
EgorFedorov
Regular Contributor

Tired to build an app with Flutter default NDK version, and got the following error. So, the answer is obvious now: 27.0.12077973 is the version suitable for all dependencies.

 

Running Gradle task 'assembleDebug'...
Your project is configured with Android NDK 26.3.11579264, but the following plugin(s) depend on a different Android NDK version:
- arcgis_maps requires Android NDK 25.2.9519653
- device_info_plus requires Android NDK 27.0.12077973
- flutter_secure_storage requires Android NDK 27.0.12077973
- flutter_web_auth_2 requires Android NDK 27.0.12077973
- geolocator_android requires Android NDK 27.0.12077973
- haptic_feedback requires Android NDK 27.0.12077973
- package_info_plus requires Android NDK 27.0.12077973
- path_provider_android requires Android NDK 27.0.12077973
- sqlite3_flutter_libs requires Android NDK 27.0.12077973
- url_launcher_android requires Android NDK 27.0.12077973
Fix this issue by using the highest Android NDK version (they are backward compatible).
Add the following to /Users/efedorov/projects/flutter/<PROJECT_NAME>/android/app/build.gradle.kts:

    android {
        ndkVersion = "27.0.12077973"
        ...
    }

 

View solution in original post

0 Kudos
6 Replies
HarishK
Esri Contributor

Our current build of argis_maps 200.7 is based on Flutter 3.29. It is important to note that Flutter 3.29 requires Android NDK version 27.0.12077973 as the minimum supported version. Therefore, it is highly recommended to use Android NDK v27.

EgorFedorov
Regular Contributor

Could you please provide any documentation on this? As I see, Flutter 3.29 tools create project with NDK 26.3.11579264 (see here). Just checked on my machine (with Flutter 3.29.3): running freshly created application caused 26.3.11579264 to be installed (it was not previously). Looks quite confusing for me.

flutter-android-ndk-version.png

0 Kudos
EgorFedorov
Regular Contributor

Tired to build an app with Flutter default NDK version, and got the following error. So, the answer is obvious now: 27.0.12077973 is the version suitable for all dependencies.

 

Running Gradle task 'assembleDebug'...
Your project is configured with Android NDK 26.3.11579264, but the following plugin(s) depend on a different Android NDK version:
- arcgis_maps requires Android NDK 25.2.9519653
- device_info_plus requires Android NDK 27.0.12077973
- flutter_secure_storage requires Android NDK 27.0.12077973
- flutter_web_auth_2 requires Android NDK 27.0.12077973
- geolocator_android requires Android NDK 27.0.12077973
- haptic_feedback requires Android NDK 27.0.12077973
- package_info_plus requires Android NDK 27.0.12077973
- path_provider_android requires Android NDK 27.0.12077973
- sqlite3_flutter_libs requires Android NDK 27.0.12077973
- url_launcher_android requires Android NDK 27.0.12077973
Fix this issue by using the highest Android NDK version (they are backward compatible).
Add the following to /Users/efedorov/projects/flutter/<PROJECT_NAME>/android/app/build.gradle.kts:

    android {
        ndkVersion = "27.0.12077973"
        ...
    }

 

0 Kudos
EgorFedorov
Regular Contributor

@HarishK 

I've migrated to Flutter 3.38 recently. Related blog post say it is necessary to use Android NDK r28 (see '16KB page size compatibility' section). On the other hand, ArcGIS Flutter SDK docs say to use r27. Could you please explain if it is critical to use one or another? In general, what should be general rule for NDK version update?

I use ArcGIS Flutter SDK 200.8.

0 Kudos
HarishK
Esri Contributor

Thanks for reaching out! We’ve tested ArcGIS Flutter SDK 200.8 with Flutter 3.38, and this compatibility article outlines all the necessary fixes to ensure full compatibility. Regarding the NDK version, we’ve also validated the SDK with NDK r28, and it works without any issues.

As a general rule, it’s best to follow the NDK version recommended by the platform or framework you’re targeting (in this case, Flutter), since newer versions often include important compatibility updates. Flutter recommends NDK r28 primarily for 16KB page size compatibility on newer Android devices. For our Flutter SDK 200.8, both r27 and r28 are supported, so you’re safe to use r28 if you’ve already migrated.
EgorFedorov
Regular Contributor

Thank you very much! Ready to keep going now!

0 Kudos