Issue
I have just started with mobile development using flutter, and there is this error when trying to run the default flutter program.
No connected devices found; please connect a device, or see flutter.dev/setup for getting started instructions.
This is a Windows 10 x64 machine.
Installed Android Studio in -
D:\Program Files\Android\Android Studio1
Installed Android SDK from Android Studio in -
D:\Android\android-sdk
Set these system environment variables
ANDROID_HOME - D:\Android\android-sdk;D:\Android\android-sdk\tools;D:\Android\android-sdk\build-tools;D:\Android\android-sdk\platform-tools
ANDROID_SDK_ROOT - D:\Android\android-sdk;D:\Android\android-sdk\tools;D:\Android\android-sdk\build-tools;D:\Android\android-sdk\platform-tools
Installed Nexus 6 API 28 device & set Emulated Performance Graphics to Hardware GLES-2.0
Installed
pie Android 9.0 x86
&pie Android 9.0 x86_64
as I was unsure which one to use. The AVD emulator launches fine with both the OS. (Which one to use?)Installed flutter in -
D:\Flutter\flutter
When I run main.dart, it shows this error:
When I run flutter doctor in the Android Studio it shows 2 issues:
[X] Android toolchain - develop for Android devices
X ANDROID_HOME = D:/Android/android-sdk
but Android SDK not found at this location.
[!] Connected device
! No devices available
When I try to run a command in powershell from the flutter directory, it gives this error:
Solution
In environment variables > User Variables, add a new PATH, like: C:\src\flutter\bin
Then restart your machine.
Answered By - rvgi
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.