Unable to run "adb", check your Android SDK installation and ANDROID SDK_ROOT environment variable: C:UsersuserAppDataLocalAndroidSdkplatform-toolsadb.exe
i have set up everything related to flutter, but no adb devices& flutter devices & my physical phone also not showing in Android studio.
i have also set path and environment variable as said in the error.
If you have any way of solving this problem, please let me know.
2
Answers
There maybe different problems causing for this.
I recommend checking SDK installation. Look does your SDK installed in the correct directory. The default one is ‘C:UsersuserAppDataLocalAndroidSdk’.
You can restart adb server. Run this code in your terminal:
If you are using physical phone, check USB connection is set to "Transfer Files" or "File Transfer".
And also enable USB debugging. Go to developer options and make sure USB debugging is enabled. If you don’t see the "Developer options" in your device settings, go to "About phone" and tap on the "Build number" multiple times (usually 7 times) until it unlocks the developer options.
Update your ADB. You can update ADB running this on your terminal:
Maybe deleting Platform tools, and reinstalling them will work.
You can add ADB path manually rather than relying on the ANDROID_SDK_ROOT environment variable, here is how you can do this.:
executable (e.g., C:UsersuserAppDataLocalAndroidSdkplatform-tools).
Try a Different Version of ADB or reinstall Android Studio.
And consider updating flutter itself. You can update by running this command on your terminal:
Last but not least run this command also :
flutter doctor
This checks for any additional setup requirements or conflicts. The output will provide insights into any missing dependencies or misconfigurations that need to be addressed.
your ANDROID_SDK_ROOT variable should be :
environment variable: C:UsersuserAppDataLocalAndroidSdk
and not
environment variable: C:UsersuserAppDataLocalAndroidSdkplatform-toolsadb.exe
In Windows Bar type in Search: "Environment properties"
This should open System Properties
Select "Enrvironment Variables"
Select "Path" Variable and click "Edit"
Seperate the Path’s witch semicolon ";"
e.g. C:flutterbin; C:UsersuserAppDataLocalAndroidSdk; etc.
Restart your computer or Logout from Account and login.
Try to start adb again