'adb' is not recognized as an internal or

2019-01-02 20:26发布

I am trying to run google map v2 on emulator, I am following this tutorial. When I was trying to install required apk file on emulator, I am getting below error.

I tried to solve this using this tutorial.Followed all steps, added the path to paltform-tools to environment path. Also after modifying the PATH variable started a new CommandPrompt window.

But getting the same error. I need to check my google map application on emulator. Kindly suggest me.

'adb' is not recognized as an internal or external command,
operable program or batch file.

enter image description here

17条回答
君临天下
2楼-- · 2019-01-02 20:26

In Windows 10,

  1. Add User Variable PATH: %USERPROFILE%\AppData\Local\Android\sdk\platform-tools.
  2. Restart cmd (if any open).
  3. adb devices, it should list, if it does, you are all set.

That's it!

查看更多
高级女魔头
3楼-- · 2019-01-02 20:26

Add your path into environment variable "PATH" where you installed your sdk with below:

\Sdk\platform-tools

You can in image below for example:

enter image description here

and reopen your command prompt to see changes.

查看更多
倾城一夜雪
4楼-- · 2019-01-02 20:26

I had same problem when I define PATH below

C:\Program Files (x86)\Java\jre1.8.0_45\bin;C:\dev\sdk\android\platform-tools

and the problem solved when I bring adb root at first.

C:\dev\sdk\android\platform-tools;C:\Program Files (x86)\Java\jre1.8.0_45\bin
查看更多
爱死公子算了
5楼-- · 2019-01-02 20:27

just open Android studio and press "Tools" on Top navigation bar

tools->SDK Manager

Where you can get SDK location

Open SDK folder -> platform-tools

查看更多
墨雨无痕
6楼-- · 2019-01-02 20:31

Set the path of adb into System Variables. You can find adb in "ADT Bundle/sdk/platform-tools" Set the path and restart the cmd n then try again.

Or

You can also goto the dir where adb.exe is located and do the same thing if you don't wanna set the PATH.

If you wanna see all the paths, just do

echo %PATH%
查看更多
唯独是你
7楼-- · 2019-01-02 20:31

If you want to use it every time add the path of adb to your system variables: enter to cmd (command prompt) and write the following:

echo %PATH%

this command will show you what it was before you will add adb path

setx PATH "%PATH%;C:\Program Files\android-sdk-windows\platform-tools"

be careful the path that you want to add if it contains double quote

after you restart your cmd rewrite:

echo %PATH%

you will find that the path is added

PS: if you just want to add the path to cmd just to this session you can use:

set PATH=%PATH%;C:\Program Files\android-sdk-windows\platform-tools
查看更多
登录 后发表回答