Hello Firebase Studio Support Team,
I am encountering a persistent build error when trying to run or preview my Flutter application on the Android emulator within the Firebase Studio environment.
The core issue is an NDK version mismatch reported by Gradle during the Android build process:
[CXX1104] NDK from ndk.dir at /nix/store/…/ndk-bundle had version [23.1.7779620] which disagrees with android.ndkVersion [27.0.12077973]
text (auto)
My project relies on recent versions of several Firebase Flutter plugins (including firebase_core
, firebase_auth
, cloud_firestore
, firebase_storage
, cloud_functions
) and other dependencies like image_picker
. The build fails specifically because these plugins require Android NDK version 27.0.12077973 or higher. However, the default Nix environment provided by Firebase Studio currently seems to include only NDK version 23.1.7779620.
I have tried the following troubleshooting steps without success:
- Switching to
channel = "unstable"
: In.idx/dev.nix
, changing the channel and rebuilding the environment did not provide the required NDK v27 (it remained v23). - Forcing NDK v23: Attempting to set
ndkVersion = "23.1.7779620"
inandroid/app/build.gradle.kts
resulted in build failures, with specific errors stating that the Firebase plugins depend on a different (higher) NDK version. - Downgrading Dependencies: Attempting to significantly downgrade Firebase and other plugins in
pubspec.yaml
to versions potentially compatible with NDK v23 resulted in either the NDK conflict persisting or introduced new compilation errors due to version incompatibilities, particularly for the web platform.
This NDK version conflict currently prevents me from building and testing the Android version of my application using the integrated Android preview within the Firebase Studio environment. The web preview works correctly (though with a warning about registerExtension
/DWDS).
Could you please advise if there is a recommended way to configure the Nix environment (.idx/dev.nix
) to use the required NDK v27, or if this is a known limitation that might be addressed in a future update to the base environment? Any guidance would be greatly appreciated.
Thank you for your time and assistance.