“adb”不被识别为内部或外部命令、可操作程序或批处理文件。

时间:2022-07-05 23:12:36

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.

我正在尝试在模拟器上运行谷歌地图v2,我正在跟随本教程。当我试图在模拟器上安装必需的apk文件时,我的错误已经到了。

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.

我试图用本教程来解决这个问题。按照所有步骤,添加到paltform-tools到环境路径的路径。在修改PATH变量之后,还启动了一个新的CommandPrompt窗口。

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.

“adb”不被识别为内部或外部命令、可操作程序或批处理文件。

16 个解决方案

#1


155  

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.

将adb的路径设置为系统变量。您可以在“ADT Bundle/sdk/platform-tools”中找到adb,设置路径并重新启动cmd n,然后再试一次。

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.

你也可以去亚洲开发银行。如果你不想设置路径的话,exe就会被定位并做同样的事情。

If you wanna see all the paths, just do

如果你想看到所有的路径,就这样做。

echo %PATH%

#2


71  

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:

如果您希望每次添加adb路径到您的系统变量中:输入cmd(命令提示符)并写入以下内容:

echo %PATH%

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

这个命令将向您展示添加adb路径之前的内容。

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:

重新启动cmd后:

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:

PS:如果你只是想添加cmd的路径到这个会话,你可以使用:

set PATH=%PATH%;C:\Program Files\android-sdk-windows\platform-tools

#3


60  

The New Android Studio 1.3 has its ADB location at:

新的Android Studio 1.3在亚洲开发银行的位置:

C:\Users\USERNAME\AppData\Local\Android\sdk\platform-tools.

Now add this location to the end of PATH of environment variables Ex:

现在将这个位置添加到环境变量的路径末尾:

C:\Users\USERNAME\AppData\Local\Android\sdk\platform-tools

#4


25  

Follow path of you platform tools folder in android setup folder where you will found adb.exe

在android安装文件夹中找到你将找到adb.exe的平台工具文件夹的路径。

D:\Software\Android\Android\android-sdk\platform-tools

D:\ \ \ Android软件\ Android sdk \平台工具

Check the screenshot for details

查看截图,了解详情。

“adb”不被识别为内部或外部命令、可操作程序或批处理文件。

#5


22  

I did this on Windows 7, by going to:

我是在Windows 7上做的:

Start > Control Panel > System > Advanced System Settings > Environment Variables...

>控制面板>系统>高级系统设置>环境变量…

In this Environment Variables window, in the User variables for (your-username) highlight Path and click Edit...

在这个环境变量窗口中,在用户变量中(你的用户名)高亮路径并点击编辑…

You then need to append a ; if there isn't already one at the end of the Variable value field, and then append C:\Users\<your-username>\AppData\Local\Android\sdk\platform-tools; to that same field.

然后你需要附加a;如果没有已经最后一个变量值的字段,然后附加C:\Users\ <用户名> \ AppData \本地Android \ \ sdk \平台工具;同一领域。

Then click the three OK buttons to get out.

然后点击三个OK按钮出来。

If you already have a Command Prompt window open, close it then re-open and the adb devices command should then work.

如果您已经有一个命令提示窗口打开,关闭它,然后重新打开,adb设备命令就可以工作了。

#6


8  

adb command can be under the new path below- C:\Users\USERNAME\AppData\Local\Android\sdk\platform-tools for new versions of Android studio. I found in this location for me.

亚行命令可以在下面的新路径——C:\Users\USERNAME\AppData\Local\Android\sdk\新版本的Android平台工具工作室。我在这个地方找到了我。

#7


4  

Based on Vamsi Tallapudis earlier answer I came up with this dynamic path:

基于Vamsi Tallapudis的早期回答,我提出了这个动态路径:

%LOCALAPPDATA%/Android\sdk\platform-tools

It's using a Windows Environment Variables. I find this solution to be both elegant and easy and would therefor like to share it.

它使用的是Windows环境变量。我发现这个解决方案既优雅又容易,并且愿意分享它。

#8


3  

In Windows 10,

在Windows中,

  1. Add User Variable PATH: %USERPROFILE%\AppData\Local\Android\sdk\platform-tools.
  2. 添加用户变量路径:%USERPROFILE%\AppData\Local\Android\sdk\platform-tools。
  3. Restart cmd (if any open).
  4. 重新启动cmd(如果有的话)。
  5. adb devices, it should list, if it does, you are all set.
  6. 亚洲开发银行的设备,它应该列出,如果它做了,你将全部设置。

That's it!

就是这样!

#9


1  

First select drive that is where Android sdk folder is there. Then you Follow the below steps

第一个选择驱动器,Android sdk文件夹在那里。然后按照下面的步骤操作。

cd DriveName:/ or Ex : cd c:/ Press 'Enter'

光盘驱动器:/或Ex: cd c:/按'Enter'

then you will give the path that is adb console path is there in a platform-tools folder so cd Root Folder/inner root folder if there/Platform-tools Press 'Enter' then it selects the adb directory.

然后,您将给出adb控制台路径的路径,它位于一个平台工具文件夹中,如果有/平台工具按'Enter',那么它将选择adb目录。

#10


1  

1st: goto the drive where your eclipse reside and goto sdk and platform tool in my case C:\adt-bundle-windows-x86_64-20140702\sdk\platform-tools

1:在我的案例C:\adt-bundle-windows-x86_64-20140702\sdk\platform-tools中,您的eclipse所在的驱动器和goto sdk和平台工具。

2nd:copy that address for ease of access

第二:复制该地址以方便访问。

“adb”不被识别为内部或外部命令、可操作程序或批处理文件。

3:open command prompt win+r and type cmd hit enter

3:打开命令提示符win+r,输入cmd回车。

4:paste the address in cmd and hit enter thats all

4:粘贴cmd的地址,然后点击回车。

“adb”不被识别为内部或外部命令、可操作程序或批处理文件。

#11


1  

In my case it was:

我的情况是:

C:\Program Files (x86)\Android\android-sdk\platform-tools

#12


1  

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

将您的路径添加到环境变量“path”中,您在其中安装了sdk,如下所示:

\Sdk\platform-tools

You can in image below for example:

你可以在下图中看到:

“adb”不被识别为内部或外部命令、可操作程序或批处理文件。

and reopen your command prompt to see changes.

并重新打开命令提示符查看更改。

#13


0  

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.

当我一开始带adb root时,问题就解决了。

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

#14


0  

This is where I found it:

这就是我发现的地方:

C:\Users\<USER>\AppData\Local\Android\sdk\platform-tools

I had to put the complete path into the file explorer. I couldn't just click down to it because the directories are hidden.

我必须把完整的路径放到文件浏览器中。我不能直接点击它,因为目录是隐藏的。

I found this path listed in Android studio:

我在Android studio中找到了这条路径:

Tools > Android > SDK Manager > SDK Tools

工具> Android > SDK管理器> SDK工具。

#15


-1  

Where is your adb.exe file located? You should either go to that folder adn run cmd or change the path through cd command.

哪里是你的亚洲开发银行。exe文件位置?你应该选择adn运行cmd或者通过cd命令改变路径。

#16


-1  

You could just drag the adb.exe on to the command prompt from sdk/platformtools and leave a space and type the command you want: like logcat.

你可以拖拽adb。从sdk/platformtools到命令提示符,离开一个空格,输入您想要的命令:像logcat。

It looks like this for me:

对我来说是这样的:

C:\adt-bundle-windows-x86-20130917\adt-bundle-windows-x86-20130917\sdk\platform-tools.exe logcat

and hit enter.

然后回车。

#1


155  

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.

将adb的路径设置为系统变量。您可以在“ADT Bundle/sdk/platform-tools”中找到adb,设置路径并重新启动cmd n,然后再试一次。

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.

你也可以去亚洲开发银行。如果你不想设置路径的话,exe就会被定位并做同样的事情。

If you wanna see all the paths, just do

如果你想看到所有的路径,就这样做。

echo %PATH%

#2


71  

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:

如果您希望每次添加adb路径到您的系统变量中:输入cmd(命令提示符)并写入以下内容:

echo %PATH%

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

这个命令将向您展示添加adb路径之前的内容。

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:

重新启动cmd后:

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:

PS:如果你只是想添加cmd的路径到这个会话,你可以使用:

set PATH=%PATH%;C:\Program Files\android-sdk-windows\platform-tools

#3


60  

The New Android Studio 1.3 has its ADB location at:

新的Android Studio 1.3在亚洲开发银行的位置:

C:\Users\USERNAME\AppData\Local\Android\sdk\platform-tools.

Now add this location to the end of PATH of environment variables Ex:

现在将这个位置添加到环境变量的路径末尾:

C:\Users\USERNAME\AppData\Local\Android\sdk\platform-tools

#4


25  

Follow path of you platform tools folder in android setup folder where you will found adb.exe

在android安装文件夹中找到你将找到adb.exe的平台工具文件夹的路径。

D:\Software\Android\Android\android-sdk\platform-tools

D:\ \ \ Android软件\ Android sdk \平台工具

Check the screenshot for details

查看截图,了解详情。

“adb”不被识别为内部或外部命令、可操作程序或批处理文件。

#5


22  

I did this on Windows 7, by going to:

我是在Windows 7上做的:

Start > Control Panel > System > Advanced System Settings > Environment Variables...

>控制面板>系统>高级系统设置>环境变量…

In this Environment Variables window, in the User variables for (your-username) highlight Path and click Edit...

在这个环境变量窗口中,在用户变量中(你的用户名)高亮路径并点击编辑…

You then need to append a ; if there isn't already one at the end of the Variable value field, and then append C:\Users\<your-username>\AppData\Local\Android\sdk\platform-tools; to that same field.

然后你需要附加a;如果没有已经最后一个变量值的字段,然后附加C:\Users\ <用户名> \ AppData \本地Android \ \ sdk \平台工具;同一领域。

Then click the three OK buttons to get out.

然后点击三个OK按钮出来。

If you already have a Command Prompt window open, close it then re-open and the adb devices command should then work.

如果您已经有一个命令提示窗口打开,关闭它,然后重新打开,adb设备命令就可以工作了。

#6


8  

adb command can be under the new path below- C:\Users\USERNAME\AppData\Local\Android\sdk\platform-tools for new versions of Android studio. I found in this location for me.

亚行命令可以在下面的新路径——C:\Users\USERNAME\AppData\Local\Android\sdk\新版本的Android平台工具工作室。我在这个地方找到了我。

#7


4  

Based on Vamsi Tallapudis earlier answer I came up with this dynamic path:

基于Vamsi Tallapudis的早期回答,我提出了这个动态路径:

%LOCALAPPDATA%/Android\sdk\platform-tools

It's using a Windows Environment Variables. I find this solution to be both elegant and easy and would therefor like to share it.

它使用的是Windows环境变量。我发现这个解决方案既优雅又容易,并且愿意分享它。

#8


3  

In Windows 10,

在Windows中,

  1. Add User Variable PATH: %USERPROFILE%\AppData\Local\Android\sdk\platform-tools.
  2. 添加用户变量路径:%USERPROFILE%\AppData\Local\Android\sdk\platform-tools。
  3. Restart cmd (if any open).
  4. 重新启动cmd(如果有的话)。
  5. adb devices, it should list, if it does, you are all set.
  6. 亚洲开发银行的设备,它应该列出,如果它做了,你将全部设置。

That's it!

就是这样!

#9


1  

First select drive that is where Android sdk folder is there. Then you Follow the below steps

第一个选择驱动器,Android sdk文件夹在那里。然后按照下面的步骤操作。

cd DriveName:/ or Ex : cd c:/ Press 'Enter'

光盘驱动器:/或Ex: cd c:/按'Enter'

then you will give the path that is adb console path is there in a platform-tools folder so cd Root Folder/inner root folder if there/Platform-tools Press 'Enter' then it selects the adb directory.

然后,您将给出adb控制台路径的路径,它位于一个平台工具文件夹中,如果有/平台工具按'Enter',那么它将选择adb目录。

#10


1  

1st: goto the drive where your eclipse reside and goto sdk and platform tool in my case C:\adt-bundle-windows-x86_64-20140702\sdk\platform-tools

1:在我的案例C:\adt-bundle-windows-x86_64-20140702\sdk\platform-tools中,您的eclipse所在的驱动器和goto sdk和平台工具。

2nd:copy that address for ease of access

第二:复制该地址以方便访问。

“adb”不被识别为内部或外部命令、可操作程序或批处理文件。

3:open command prompt win+r and type cmd hit enter

3:打开命令提示符win+r,输入cmd回车。

4:paste the address in cmd and hit enter thats all

4:粘贴cmd的地址,然后点击回车。

“adb”不被识别为内部或外部命令、可操作程序或批处理文件。

#11


1  

In my case it was:

我的情况是:

C:\Program Files (x86)\Android\android-sdk\platform-tools

#12


1  

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

将您的路径添加到环境变量“path”中,您在其中安装了sdk,如下所示:

\Sdk\platform-tools

You can in image below for example:

你可以在下图中看到:

“adb”不被识别为内部或外部命令、可操作程序或批处理文件。

and reopen your command prompt to see changes.

并重新打开命令提示符查看更改。

#13


0  

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.

当我一开始带adb root时,问题就解决了。

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

#14


0  

This is where I found it:

这就是我发现的地方:

C:\Users\<USER>\AppData\Local\Android\sdk\platform-tools

I had to put the complete path into the file explorer. I couldn't just click down to it because the directories are hidden.

我必须把完整的路径放到文件浏览器中。我不能直接点击它,因为目录是隐藏的。

I found this path listed in Android studio:

我在Android studio中找到了这条路径:

Tools > Android > SDK Manager > SDK Tools

工具> Android > SDK管理器> SDK工具。

#15


-1  

Where is your adb.exe file located? You should either go to that folder adn run cmd or change the path through cd command.

哪里是你的亚洲开发银行。exe文件位置?你应该选择adn运行cmd或者通过cd命令改变路径。

#16


-1  

You could just drag the adb.exe on to the command prompt from sdk/platformtools and leave a space and type the command you want: like logcat.

你可以拖拽adb。从sdk/platformtools到命令提示符,离开一个空格,输入您想要的命令:像logcat。

It looks like this for me:

对我来说是这样的:

C:\adt-bundle-windows-x86-20130917\adt-bundle-windows-x86-20130917\sdk\platform-tools.exe logcat

and hit enter.

然后回车。