Nikko
Nikko

Reputation: 301

How do I create a flutter project despite the error "At least one platform must be selected"?

I'm trying to create a new Flutter project in IntelliJ and I get the error "At least one platform must be selected"

I followed the instructions from the Flutter website: ( here and here) However when I click on 'Finish' I receive the error shown and in the specified place just an empty folder is created.

Example from start to end:

Notes:

flutter --version returns

Flutter 1.22.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 9b2d32b605 (11 days ago) • 2021-01-22 14:36:39 -0800
Engine • revision 2f0af37152
Tools • Dart 2.10.5

and if I change the "Flutter SDK path" to something else I get the warning "Flutter SDK is not found in the specified location." So Flutter should be set correctly


using Ubuntu 20.04.1 LTS 64-bit

and IntelliJ IDEA v.2020.1.4

IntelliJ doesn't open after I close it, I need to kill the process first, even though the window is closed. Not sure if that impacts in any way, but I'll reinstall the IDE


What I've tried without success:

Upvotes: 12

Views: 2842

Answers (4)

sourav pandit
sourav pandit

Reputation: 9135

Just the temporary solution create project with cmd

flutter create my_app

must have flutter environment set in your OS. Then open with intellij project by browse my_app directory.

Upvotes: 2

lambda
lambda

Reputation: 25

I am really sorry for adding another answer but I don't have enough reputation to comment. I tried the solution given by Ben, but it didn't work (partially). The issue originated in an earlier version and a recent update (53.0) brought it back. I installed the 52.2.5 version which worked for me click here to download version 52.2.5 or pick one which might work for you

Upvotes: 0

Ben Jie Ming
Ben Jie Ming

Reputation: 66

Problem is with 53.0 version of Flutter plugin for IntelliJ. You need to install previous version.

  1. Download Flutter plugin from this link (https://plugins.jetbrains.com/plugin/download?rel=true&updateId=107561)
  2. Open IntelliJ
  3. Go to Settings
  4. Click on Plugins
  5. Click on Settings icon at the right corner of navbar
  6. Click "Install Plugin from Disk..."
  7. Select .zip file of Flutter plugin you just downloaded
  8. Restart IDE

This works for me, hope this will solve your problem.

Upvotes: 4

lena
lena

Reputation: 93868

Known issue (caused by flutter/devtools#2653), please see https://github.com/flutter/flutter-intellij/issues/5230#issuecomment-771279236 for a workaround

Upvotes: 4

Related Questions