Firebase studio android emulator bug

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:

  1. 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).
  2. Forcing NDK v23: Attempting to set ndkVersion = "23.1.7779620" in android/app/build.gradle.kts resulted in build failures, with specific errors stating that the Firebase plugins depend on a different (higher) NDK version.
  3. 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.

@Renato_P - is this on a new project, or are you seeing this on an older project? If this is an older project, did the emulators start failing only recently?

Thank you for your response.

To answer your question:

This is a relatively new project created directly within Firebase Studio.

The Android build error (NDK v23 vs v27 mismatch) started occurring when attempting to build the app after adding current versions of the standard Firebase Flutter plugins (like firebase_core, firebase_auth, cloud_firestore, etc.) via pubspec.yaml.

As the Gradle error log indicated previously, these plugins explicitly require NDK v27.0.12077973 or higher. However, the Firebase Studio environment, even when configured to use the unstable Nix channel, seems to consistently provide only NDK v23.1.7779620.

So, the failure isn’t necessarily due to a recent change in the emulator or environment behavior itself, but rather a standing incompatibility between the NDK version currently provided by the Firebase Studio base environment and the requirements of up-to-date Firebase dependencies.

I understand the general information provided regarding the IDX migration. My core issue remains the inability to build for Android due to the NDK version provided by the environment.

Is there a known workaround or a way to configure the Firebase Studio Nix environment to provide NDK v27 or higher to satisfy these common plugin requirements?

Thanks again for your help.

Renato P. (italy)

I would appreciate some assistance with this bug