Empty flutter project after creation with Android studio

Viewed 1560

I am experiencing a problem with flutter creation using Android Studio.

I have flutter SDK in place:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.592], locale en-NZ)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    X Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed
      instructions.
[√] Android Studio (version 3.6)
[!] VS Code, 64-bit edition (version 1.36.0)
    X Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[!] Connected device
    ! No devices available

Nevertheless, Android studio does nothing after creation. So I manually open the project and it is empty.

Project folders

The project structure shows NO SDK. enter image description here

Don't know how to fix this. Please help!

4 Answers

I had the same issue.

As it turned out my Dart SDK settings got erased.

What should help:

  1. Go to Settings -> Language & Frameworks -> Dart;
  2. Enter your path to Dart SDK. It is located at %your_flutter_sdk%/bin/cache/dart-sdk. Make sure that proper version is displayed under this path;
  3. Enable Dart support for this project by checking it;
  4. Save changes and restart Android Studio.

enter image description here

Do not install Flutter in a directory like C:\Program Files\ that requires elevated privileges.

What solved it for me was selecting Use android.* artefacts when creating the Project.

Hope that works for anyone else. Manually adding the Dart path as Vsevolod describes did unfortunately not generate the files. The path was indeed empty, but adding one and reloading Android studio did nothing.

creating project

Related