I'm completely lost at this point. I turned on machine today and android studio couldn't recognize the device but vs code could, after spending hours finding solution. I reinstalled android studio and reset everything and now android studio recognizes the device but after clicking on run I see Unable to locate a development device; please run 'flutter doctor' for information about installing additional components.
Unable to locate a development device; please run 'flutter doctor' for information about installing additional components.
but running flutter doctor shows this
[✗] Android toolchain - develop for Android devices
✗ ANDROID_HOME =
/home/udaykhalsa/Android/Sdk:/home/udaykhalsa/Android/Sdk:/home/udaykhalsa
/Android/Sdk/platform-tools:/home/udaykhalsa/Programming-EnvironmentFiles/
flutter/bin:/home/udaykhalsa/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/
local/sbin:/opt/android-sdk/tools:/opt/android-sdk/tools/bin:/var/lib/flat
pak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendo
r_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin
but Android SDK not found at this location.
.zshrc
export ZSH="/home/udaykhalsa/.oh-my-zsh"
export PATH="/home/udaykhalsa/Programming-EnvironmentFiles/flutter/bin":$PATH
export PATH="/home/udaykhalsa/Android/Sdk/platform-tools":$PATH
export PATH="/home/udaykhalsa/Android/Sdk":$PATH
export ANDROID_HOME="/home/udaykhalsa/Android/Sdk":$PATH
I'm not daring to make any changes to zshrc as I did a while back all the commands were not found. Any help appreciated.
Perform below, and did you observe the 'adb' file?
$ ls $ANDROID_HOME/platform-tools/adb
Am using macOS, my sdk is found inside 'Library' folder unlike yours. Should NOT be an issue if Android Studio is already working for you.
export ANDROID_HOME="/Users/someuser/Library/Android/sdk":$PATH
To see connected devices, issue either commands:
$ adb devices
$ flutter devices
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.