Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open an existing Flutter Project in Android Studio

Tags:

I might sound noob here but I can't see a clear way of opening existing Flutter Project in Android Studio 3.1.2.

I checked this but it didn't work. So I want to know if there is a standard IDE way of doing this? I also can't find any docs clearly mentioning it. Do I need to install a 3rd party plugin?

After opening it as an Existing Android Studio Project, I get the following error:

error

The error is solved by running Get Dependencies. Is it a normal behavior?

like image 367
Kartik Shandilya Avatar asked May 27 '18 02:05

Kartik Shandilya


2 Answers

  1. Install Flutter plugin for Android studio: https://flutter.io/get-started/editor/

  2. Open Android Studio

  3. Open existing Android Studio project by using one of below methods:


EASIEST WAY: Drag your project folder and drop to Android Studio.


Other ways:

Android Studio 1

Android Studio 2

Android Studio 3

like image 96
Phuc Tran Avatar answered Sep 18 '22 19:09

Phuc Tran


What works for me was to open existing Android Studio project like mentioned above, and then go to menu

Tools -> Flutter -> Flutter Clean

Then configuration window will open and ask you to locate flutter sdk. After locating the sdk, click OK and then the flutter functions will be available (Pub buttons, runs menu). After that you can proceed to get the dependencies (pub get).

It's basically cleaning the project folder of previous setting(s) which might conflicting with the system (android studio). But that won't happen if you get the project from source repository because all of the junk files wont be in the project folder.

like image 43
Irfandi D. Vendy Avatar answered Sep 16 '22 19:09

Irfandi D. Vendy