Flutter does not find android sdk Flutter does not find android sdk android android

Flutter does not find android sdk


Flutter provides a command to update the Android SDK path:

Use flutter config --android-sdk <path-to-your-android-sdk-path>


Kindly first of all check your latest sdkfirst step:install latest Sdk platform

second step:Install all these licenses

Now Run

run flutter doctor --android-licenses Press Y against each agreement

run flutter doctorflutter doctorit will work fine.


Choose the folder to install (I called it BASE_PATH) and use the following commands to install SDK with flutter:

Install SDK

cd $BASE_DIRmkdir android-sdkcd android-sdkwget https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zipunzip commandlinetools-linux-6200805_latest.zip./tools/bin/sdkmanager --sdk_root=$(pwd) "build-tools;28.0.3" "emulator" "platform-tools" "platforms;android-28" "tools"

I used a separate folder for SDK, because it will add parent folders.

Install Flutter

cd $BASE_DIRwget https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_v1.12.13+hotfix.8-stable.tar.xztar xvf flutter_linux_v1.12.13+hotfix.8-stable.tar.xz

Export Vars (you can add them to your .bashrc)

export ANDROID_SDK=$BASE_DIR/android-sdkexport ANDROID_PATH=$ANDROID_SDK/tools:$ANDROID_SDK/platform-toolsexport FLUTTER=$BASE_DIR/binexport PATH=$PATH:$ANDROID_PATH:$FLUTTER

Check!

flutter doctorDoctor summary (to see all details, run flutter doctor -v):[✓] Flutter (Channel beta, v1.12.13, on Linux, locale en_US.UTF-8)[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)[!] Android Studio (not installed)[✓] VS Code (version 1.31.1)[!] Connected device    ! No devices available! Doctor found issues in 2 categories.