I am trying to setup Flutter in windows 10. I have:
When I run "andoid doctor" in command prompt is shows no errors:
But When I try to configure VSCode Editer with steps given in https://flutter.io/get-started/editor/
It Throws error as show below:
I tried after setting environment variable as: ANDROID_HOME = F:\Program Files\Android
Even after setting the above I get the same error.
ANDROID_HOME is usually a directory like . android . Its where things like the Debug Key will be stored. According to David Turner on the NDK Mailing List, both ANDROID_NDK_ROOT and ANDROID_SDK_ROOT need to be set because other tools depend on those values (see Recommended NDK Directory?).
Reinstalling the platform tools might fix this problem. Open Android Studio, click SDK Manager in the toolbar or click Tools > SDK Manager, click SDK Tools, then uncheck Android-SDK Platform-Tools (as shown above). After this, open C:\Users\Username\AppData\Local\Android\Sdk and delete the platform-tools folder.
My device was not getting detected by VS Code so , when i searched i found you need to set Android sdk location in Flutter environment for VS code to detect Device so i went to Flutter sdk folder C:\Research\flutter
and double clicked on flutter_console
which opened a Flutter console and run command
flutter config --android-sdk C:\Users\annur.arya\AppData\android-sdk
and now it works
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With