flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

dev.flutter.flutter-gradle-plugin conflicts with repositoriesMode = PREFER_PROJECT when running Gemini Journeys in Android Studio Preview

Open armanso opened this issue 6 months ago • 1 comments

Use case

Description:

When I run a Gemini Journey in Android Studio Preview (2025.1.2) on a Flutter project, the build fails with this error:

Build was configured to prefer settings repositories over project repositories but repository 'Google' was added by build file 'build.gradle.kts'

I did not make any manual changes to the build.gradle.kts file related to repositories. This issue only happens when running a Journey. If I just build or run the app normally in Android Studio Preview, it works without any issues.

Proposal


Steps to Reproduce:

  1. Create a standard Flutter project.
  2. Open it in Android Studio Preview (2025.1.2).
  3. Run a Gemini Journey.
  4. Build fails with the error above.

Expected Behavior:

The project should build successfully when running a Journey, just like it does when running normally.

Sample app -> https://github.com/armanso/Flutter-Journeys


Actual Behavior:

The build fails with a repository conflict error caused by a repositoriesMode violation.


Flutter Doctor Output:

[✓] Flutter (Channel stable, 3.29.0, on macOS 15.1.1 24B91 darwin-arm64, locale en-US)
[✓] Android Studio (version 2025.1.2)

armanso avatar May 28 '25 22:05 armanso

@jwren: any ideas?

pq avatar Jun 12 '25 17:06 pq