For Windows users,
Set the environment variable PATH
for the Flutter SDK (...\flutter_windows_v0.2.8-beta.zip\flutter\bin)
No device connect
For more information, you can check blog post Flutter - How to install Flutter in Android Studio
Here is the information from the mentioned page:
Add Flutter to the Windows environment variable PATH
:
- Navigate in to the Flutter SDK folder.
- Go inside the bin folder and copy the directory path (in your case
C:\Flutter\bin
)
- Go to “Control Panel > User Accounts > User Accounts > Change my environment variables”
- Under “User variables”, select the
PATH
variable and click Edit.
- Put C:\Flutter\bin and apply.
Same as the Flutter environment, we have to set the Android SDK path if it is on custom location.
- Navigate into the Android SDK folder.
- Copy the directory path (in your case
..AndroidStudioSDK\sdk
)
- Go to Control Panel* → User Accounts → User Accounts → Change my environment variables
- Under “User variables” select the
PATH
variable and click Edit.
- Enter
..AndroidStudioSDK\sdk
with ANDROID_HOME
and apply.
Tips:
If you facing the following issue,
1.[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from https://developer.android.com/studio/index.html
On the first launch, it will assist you in installing the Android SDK components.
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location.
You can resolve it with the following command.
flutter config --android-sdk <android-sdk-location>
OR
flutter config --android-sdk "android-sdk-location"
- Error: Unknown argument --licenses
You can resolve it with the following command.
flutter -v doctor --android-licenses
Now, pick the emulator you want to use and click the green arrow to run the project. So, here default screen that is already designed.