This article will show how to set up Android Studio to run Flutter Applications. Android Studio is one of the popular IDE developed by Google itself to create cross-platform android applications. First, you have to install Android Studio of version 3.0 or later, as it offers an integrated IDE experience for a Flutter. You can refer this for details: Android Studio
Install the Flutter and Dart plugins:
After the successful installation of Android Studio, you have to install Flutter and Dart plugins. To do so follow the steps mentioned below:
- Start Android Studio.
- Open plugin preferences (Configure > Plugins as of v18.104.22.168 or later).
- Select the Flutter plugin and click Install.
- Click Yes when prompted to install the Dart plugin.
- Click Restart when prompted.
Open plugin preferences:
- For macOS: Preferences > Plugins on macOS,
- For Linux and Windows: File > Settings > Plugins
Now, Select Marketplace, select the Flutter plugin and click Install.
Creating the application:
After installing Dart and Flutter plugins create a flutter app to check if it is working properly or not, to do so follow the steps mentioned below:
Step 1: Open the IDE and select Start a new Flutter project.
Step 2: Select the Flutter Application as the project type. Then click Next.
Step 3: Verify the Flutter SDK path specifies the SDK’s location (select Install SDK… if the text field is blank).
Step 4: Enter a project name (for example, myapp). Then click Next.
Step 5: Click Finish.
Step 6: Wait for Android Studio to install the SDK and create the project.
Note: When creating a new Flutter app, some Flutter IDE plugins ask for a company domain name in reverse order, something like com.example. The company domain name and project name are used together as the package name for Android (the Bundle ID for iOS) when the app is released. If you think that the app might be released, it’s better to specify the package name now. The package name can’t be changed once the app is released, so make the name unique.
The above steps create a Flutter project directory called flutter_app that contains a simple demo app that uses Material Components.
Running the application:
Follow the below steps to run the flutter application that was structured above:
Step 1: Locate the main Android Studio toolbar:
Step 2: In the target selector, select an Android device for running the app. If none are listed as available, select Tools> Android > AVD Manager and create one there. For details, see Managing AVDs.
Step 3: Click the run icon in the toolbar, or invoke the menu item Run > Run.
After the app build completes, you’ll see the starter app on your device.
- Flutter - Setup for Web Development
- Android | AdMob Interstitial Ads for Android Studio
- Android | How to Create/Start a New Project in Android Studio?
- How to install Android Applications in Mobile Phone without USB Cables using Android Studio
- How to Add OpenCV library into Android Application using Android Studio?
- How to Clone Android Project from GitHub in Android Studio?
- Android | AdMob Banner Ads for Android Studio
- How to Add Audio Files to Android App in Android Studio?
- How to Setup Apache Web Server On Any Android Device?
- Toasts for Android Studio
- Guide to Install and Set up Android Studio
- How to build a simple Calculator app using Android Studio?
- 10 Important Android Studio Shortcuts You Need the Most
- How to scale different Views to all screen sizes in Android Studio?
- How to create a Stopwatch App using Android Studio
- How to Upload Project on GitHub from Android Studio?
- How to build a simple music player app using Android Studio
- Logcat window in Android Studio
- Guessing the Number Game using Android Studio
- How to populate RecyclerView with Firebase data using FirebaseUI in Android Studio
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.