# Persistent Android build failure (firebase\_auth not found) despite accepted licenses in Firebase Studio/IDX environment

**URL:** <https://community.firebasestudio.dev/t/persistent-android-build-failure-firebase-auth-not-found-despite-accepted-licenses-in-firebase-studio-idx-environment/11014>\
**Category:** General\
**Tags:** android-studio-cloud\
**Created:** [April 24, 2025, 1:44am UTC](https://community.firebasestudio.dev/t/persistent-android-build-failure-firebase-auth-not-found-despite-accepted-licenses-in-firebase-studio-idx-environment/11014 "2025-04-24T01:44:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Frazier](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/jeff_frazier/32/4786_2.png) [@Jeff\_Frazier](https://community.firebasestudio.dev/u/Jeff_Frazier)\
**Post date:** [April 24, 2025, 1:44am UTC](https://community.firebasestudio.dev/t/persistent-android-build-failure-firebase-auth-not-found-despite-accepted-licenses-in-firebase-studio-idx-environment/11014/1 "2025-04-24T01:44:30Z")

</div>

I am encountering a persistent Android build failure in my Flutter project within the Firebase Studio/IDX environment. The error message indicates that the `firebase_auth` package files cannot be found in the pub cache during the Flutter compilation step of the Android build.

**Error Message Snippets:**

lib/dashboard\_screen.dart:3:8: Error: Error when reading ‘../.pub-cache/hosted/pub.dev/firebase\_auth-5.5.2/lib/firebase\_auth’: No such file or directory import ‘package:firebase\_auth/firebase\_auth’; // Import Firebase Auth ^ lib/dashboard\_screen.dart:35:18: Error: The getter ‘FirebaseAuth’ isn’t defined for the class ‘\_DashboardScreenState’. - ‘\_DashboardScreenState’ is from ‘package:myapp/dashboard\_screen.dart’ (‘lib/dashboard\_screen.dart’). Try correcting the name to the name of an existing getter, or defining a getter or field named ‘FirebaseAuth’. final user = FirebaseAuth.instance.currentUser; // Get the current user ^^^^^^^^^^^^ Target kernel\_snapshot\_program failed: Exception FAILURE: Build failed with an exception. \* What went wrong: Execution failed for task ‘:app:compileFlutterBuildDebug’. \> Process ‘command ‘/home/user/flutter/bin/flutter’’ finished with non-zero exit value 1

text (auto)

The core problem appears to be related to the Android toolchain setup within this specific environment. `flutter doctor` consistently reports “Some Android licenses not accepted” despite multiple attempts to resolve this by running `flutter doctor --android-licenses` and accepting all presented licenses. Although the license acceptance command finishes successfully, the state is not reflected in the main `flutter doctor` output.

**Steps taken to troubleshoot:**

1. Ran `flutter pub get` multiple times.
2. Attempted `flutter pub cache clean` and re-running `flutter pub get`.
3. Ensured `firebase_auth` version in `pubspec.yaml` (`^5.5.2`) is compatible with other dependencies (`firebase_data_connect`).
4. Ran `flutter clean` to remove build artifacts.
5. Inspected `android/app/google-services.json` and `android/app/build.gradle.kts` to confirm correct package name and Google Services plugin application.
6. Ran native Android clean using `cd android && ./gradlew clean`.
7. Attempted direct Gradle build with `--refresh-dependencies` and flags to disable caching/watching, but encountered unrecognized flag errors.
8. Ran `flutter doctor --android-licenses` and manually accepted all licenses multiple times (command reports success, but `flutter doctor` still shows the issue).
9. Examined `flutter doctor -v` output, which confirms the persistent unaccepted Android licenses and notes warnings about unsupported file system watching.

The build consistently fails at the `:app:compileFlutterBuildDebug` step with the same `firebase_auth` not found error. It seems the unresolved Android licensing issue is preventing the Flutter build process from correctly accessing or utilizing the installed packages.

Any insights or suggestions, especially from users familiar with Firebase Studio/IDX environment specifics or persistent Android licensing problems, would be greatly appreciated.
