Flutter is an open-source mobile development kit made by Google. It was first named in 2015 and was only released in May 2017. It allows developers to create cross-platform apps that can run on both Android and iOS while only using one programming language and one codebase. Dart, a programming language created by Google in 2011, is going to be the language that you are going to use if you want to use Flutter. Dart is mostly used in front-end development to create mobile and web applications.
If we want to test our Flutter app, we have several options on which emulator we are going to use. Some might opt to go for a virtual device, and some might test their app on Windows platform. In my case, I wanted to test my application on my android device. In this blog, we are going to learn how to setup your android device as an emulator for testing Flutter applications.
Before going into details on how to setup your android device, you should have the following installed:
- Android Studio
- Visual Studio Code with Flutter and Dart plugins(optional)
Check your Android Version
Before setting up your android device, make sure that your Android device is running Android 4.1 (API level 16) or higher. To check it, follow the following steps:
- Go to Settings.
2. Scroll towards the bottom and find About Device or About Phone.
3. Select Android Version (In some phones, you may have to tap Software Information).
If your phone passed the requirements, it is now time to setup your Android device.
Steps on setting up your android device
- Enable USB Debugging and Developer Options.
To enable developer options, do the first 2 steps in the Check Your Android Version guide above but this time, select Version and tap on Build Number 7 times.
Now go back to Settings and find System>Developer Options>Scroll down to find Debugging and enable USB debugging.
2. (Windows-only)Install Google USB Driver either through downloading the zip file or Android SDK Manager.
- Open Android Studio
- Select SDK Manager in the top-right section of the application
- Select SDK Tools and tick the checkbox next to Google USB Driver and click Apply
3. Plug your phone into your computer and allow authorization on your device
4. Open cmd and type flutter devices to see if your computer recognizes your device.
Flutter is very easy to use and is definitely optimal for users to begin with if they want to get into developing for mobile devices. It is very easy to learn and it can be a good starting point for people that are aspiring to be mobile developers. I hope that this blog has got you interested in Flutter. Share the article to others if you found it helpful.