'Android Studio Terminal: Command not found
I would like to run the following command in my Terminal of Android Studio.:
adb kill-server
adb start-server
I am getting the issue:
Command not found.
I have already read that I have to add the path somehow. But I do not understand how it should be done...
I am running Android Studio 2.2 on Windows 10 Pro.
Solution 1:[1]
If you are using mac or linux, you can try like this
export ANDROID_HOME=/Users/$(whoami)/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools
Now Check
adb status
Solution 2:[2]
if you are still getting same error,simply go to your sdk location in terminal and type cd platform-tools .Then start doing what you want to do.adb works here. :)
Solution 3:[3]
If you don't want to modify your system environment and instead keep the changes local to Android Studio, do this:
Goto Settings -> Tools -> Terminal
Add
ANDROID_SDK_ROOT=C:\Users\<your username>\AppData\Local\Android\Sdkto "Environment variables". Separate multiple variables with semicolon (;) or use the GUI tool (Shift+Enter). Modify the path to point to your SDK installation as needed.Change "Shell path" to
C:\Windows\System32\cmd.exe /k "set "PATH=%ANDROID_SDK_ROOT%\platform-tools;%PATH%" "
Notes:
ANDROID_SDK_ROOTis used for the installation directory of the SDK according to the documentation.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Farid Haq |
| Solution 2 | |
| Solution 3 | Niklas Holm |
