Skip to content

Auto-select the flutter generator when invoking the new project wizard from the "New Flutter Project..." action #8210

Open
@csells

Description

@csells

I downloaded the latest version of Android Studio so I could play with the Gemini integration, but every time I try to generate a new Flutter project, I get something like this:

Image

Android Studio version:

Android Studio Meerkat Feature Drop | 2024.3.2
Build #AI-243.25659.59.2432.13423653, built on April 29, 2025
Runtime version: 21.0.6+-13368085-b895.109 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 15.4.1
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 4096M
Cores: 12
Metal Rendering is ON
Registry:
  ide.experimental.ui=true
Non-Bundled Plugins:
  Dart (243.26753.1)
  io.flutter (85.3.1)

Flutter plug-in version: 85.3.1
Dart plug-in version: 243.26753.1

Activity

pq

pq commented on May 21, 2025

@pq
Contributor

Thanks Chris!

I took a quick crack at a repro and had no luck.

Here's what I had checked in the project creation wizard:

Image

and the result:

Image

What does your new project wizard content look like?

mit-mit

mit-mit commented on May 22, 2025

@mit-mit
Member

I wonder if this is a gradle issue based on the first screenshot? @csells in a terminal are you able to flutter create foobar & flutter build apk ?

csells

csells commented on May 23, 2025

@csells
Author

@mit-mit No problem with flutter create foobar & cd foobar & flutter build apk as shown here:

Image
csells

csells commented on May 23, 2025

@csells
Author

@pq here's that video I promised. Let me know if there are some log files I can dig up for you or something. I'm on the latest version of AS, the Flutter + Dart extensions to AS and Flutter stable.

Screen.Recording.2025-05-22.at.6.43.22.PM.mov
pq

pq commented on May 23, 2025

@pq
Contributor

Hey Chris!

Watching your video at around 0:10, it looks like the project type selected when you invoke the "New Flutter Project..." action is actually Kotlin (which appears to mean vanilla Kotlin and not, as you might expect, a Flutter android project that uses Kotlin).

Image

I see a similar default selection when I invoke "New Flutter Project..." but when I manually select "Flutter" from the generator list,

all works as expected.


Implementation aside: digging into FlutterNewProjectAction we're just creating a NewProjectWizard so this is WAI:

  public void actionPerformed(@NotNull AnActionEvent e) {
    if (FlutterUtils.isAndroidStudio()) {
      System.setProperty("studio.projectview", "true");
    }
    NewProjectWizard wizard = new NewProjectWizard(null, ModulesProvider.EMPTY_MODULES_PROVIDER, null);
    NewProjectUtil.createNewProject(wizard);
  }

I do have to wonder if there isn't some way to select the Flutter generator our of the gate though (since that seems to be what folks would expect)?


Thanks for the video, Chris! Let me know if this clears anything up for you!

csells

csells commented on May 23, 2025

@csells
Author

thanks, @pq. if I override the default and choose the Flutter generator after choosing New Flutter Project, I get a Flutter project. I don't know why that's not the default; it certainly should be.

changed the title [-][bug] Can't create a Flutter project in the latest Android Studio[/-] [+]Auto-select the flutter generator when invoking the new project wizard from the "New Flutter Project..." action[/+] on May 23, 2025
removed their assignment
on May 23, 2025
pq

pq commented on May 23, 2025

@pq
Contributor

Ok, cool! I agree it's not the best behavior. I'm not sure if IntelliJ's NewProjectWizard gives us a good way to set the default but I've turned this into an enhancement request so we can loop back and check it out.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Auto-select the flutter generator when invoking the new project wizard from the "New Flutter Project..." action · Issue #8210 · flutter/flutter-intellij