Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Androidx error creating new flutter project in Android Studio

When I want to start a new Flutter Project in Android Studio (3.5.1.) I get the following event:

Error creating project. Could not find an option named "androidx". Empty folders are created, but no project.

I've not set anything to needing androidx and I've updated everything I could in Android Studio.

How do I get around this error?

like image 872
denelan Avatar asked Oct 04 '19 12:10

denelan


People also ask

What is AndroidX in flutter?

AndroidX is a redesigned library to make package names more clear. So from now on, the Android hierarchy will only be for Android default classes that come with the Android operating system. Other library/dependencies will be part of AndroidX and all new development will be updated in AndroidX.05-Apr-2019.

Can I run flutter project in Android Studio?

Step 1: Open the Android Studio and select Tools from the menu bar and click on SDK Manager. Step 2: In the newly open window click on the plugins and in the search bar search for Flutter and Dart and then install it. Step 4: Now after installing Flutter and Dart we are ready to import a Flutter project.

Is Android SDK required for flutter?

Ans: You don't require Android Studio; all you really need is Android SDK, which you can download and specify the SDK location in the environment variable for the flutter set up to recognize.


1 Answers

There's an accepted answer already but to me the way to solve that was very different, so I still post it hoping for it to be useful to someone.

In my case, I just had to update flutter. To do so, I ran

flutter upgrade

from the command line. That took a few minutes. Afterwards I was able to create a Flutter project from Android Studio flawlessly.

like image 129
Dakatine Avatar answered Sep 22 '22 14:09

Dakatine