I just tried intalling flutter and since I already had android studio and the android sdk installed I just followed the installation of flutter. Here is my problem: When I r
To open Tools=> Android Sdk Click SDK tools tab => check show package details and check all 28 SDK version install that and to fix the issue
I assume this is this known issue https://github.com/flutter/flutter/issues/13750
You need to fix the path to the SDK manually until this is fixed in the file
my_flutter_project/android/local.properties
update
Add $ANDROID_HOME\sdk\tools
and $ANDROID_HOME\sdk\platform-tools
to the PATH
environment variable.
First run flutter upgrade from your terminal , If you get the following error,
ANDROID_HOME = C:\Users\Name\AppData\Local\Android\sdk\Android
but Android SDK not found at this location.
What worked is Tools->Flutter->open Android module in Android studio, For me plugin flutter_email_sender was giving this error, so I copied local.properties file into it and the build become successful.
Or
Open Terminal
Run touch ~/.bash_profile; open ~/.bash_profile
export ANDROID_HOME=/Users/<macusername>/Library/Android/sdk
export ANDROID_SDK_ROOT=/Users/<macusername>/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Run source ~/.bash_profile
in android studio terminal
This solved my issue.
flutter config --android-sdk "C:\Users<folder under your name>\AppData\Local\Android\Sdk"
All the best :)
I solved this problem by below step,
1) go to -> system environment -> Environment Variables -> system Variable
2) create New Variable Name ANDROID_HOME and Value D:\Androidsdk\tools (custom android sdk path).
3) concat this path D:\Androidsdk\platform-tools in Path variable value using ";". (also in system Variable)
4) that's all, Restart the PC to apply changes and try again -- flutter Doctor.