ddms: 'adb.exe,start-server' 失败 -- 如有必要,请手动运行 Android Studio

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26137634/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 11:05:02  来源:igfitidea点击:

ddms: 'adb.exe,start-server' failed -- run manually if necessary, Android Studio

androidandroid-studioadb

提问by Jaskey

My adb is down, no matter I am using ADT or Android Studio.

无论我使用 ADT 还是 Android Studio,我的 adb 都已关闭。

And according to the second answer of this SO question, I did:

根据this SO question的第二个答案,我做了:

  1. I type:

    adb nodaemon server
    

    Output:

    cannot bind 'tcp:5037'
    
  2. Then netstat -ano | findstr 5037

    I did find a pid of 7416 who listen in 127.0.0.1:5037

  3. I use taskkill /pid 7416 -fto kill it.

  4. I type netstat -ano | findstr 5037again, I found another pid listens at 127.0.0.1:5037again!

  1. 我输入:

    adb nodaemon server
    

    输出:

    cannot bind 'tcp:5037'
    
  2. 然后 netstat -ano | findstr 5037

    我确实找到了一个 7416 的 pid 谁在听 127.0.0.1:5037

  3. taskkill /pid 7416 -f用来杀死它。

  4. netstat -ano | findstr 5037再次输入,我发现另一个 pid127.0.0.1:5037再次监听!

I guess they are the same, but I have no idea who it is.

我猜他们是一样的,但我不知道是谁。

Can I simply have a easy way to release this port or change the adb port to another one?

我是否可以简单地释放此端口或将 adb 端口更改为另一个端口?

采纳答案by Jaskey

I solve this problem at last! I finally found the program name of the pid and I kill it in the task manager.

我终于解决了这个问题!终于找到pid的程序名,在任务管理器里杀了。

The way to detect is described in the question:

问题中描述了检测的方法:

  1. adb nodaemon server

  1. adb 节点服务器

Output:

输出:

cannot bind 'tcp:5037'

无法绑定 'tcp:5037'

2.and then netstat -ano | findstr 5037to find who takes this port.

2.然后netstat -ano | findstr 5037找到谁占用了这个端口。

Get the pid and find it in the task manager. Please note that the process tab may not show the column of pid, we should include it by setting.

获取pid并在任务管理器中找到它。请注意,进程选项卡可能不会显示 pid 列,我们应该通过设置包含它。

In my case, it is tfadb.exe who takes this port! This is a Chinese Video program client! Try to kill it in task manager.

在我的例子中,是 tfadb.exe 占用了这个端口!这是一个中文视频节目客户端!尝试在任务管理器中杀死它。

Now I stop it starting from booting. The problem is solved.

现在我从启动开始停止它。问题已经解决了。

回答by José Mercado

In my case I was trying to use genymotion emulator device. With genymotion opened and running, I've tried to run my app in this emulator but I it doesn't worth

就我而言,我试图使用 genymotion 模拟器设备。打开并运行 genymotion,我尝试在此模拟器中运行我的应用程序,但我不值得

In this part I had this error:

在这部分我有这个错误:

'C:\Users\Jose\AppData\Local\Android\sdk\platform-tools\adb.exe,start-server' failed -- run manually if necessary

Then I've tried Jaskey's solution but it doesn't works.

然后我尝试了 Jaskey 的解决方案,但它不起作用。

So I stopped genymotion emulator. Then I restart ADB (Tools > Android > Unchecked Unable ADB Integration then I've checked again)

所以我停止了 genymotion 模拟器。然后我重新启动 ADB(工具 > Android > 未选中的 Unable ADB 集成然后我再次检查)

Next I've start genymotion emulator again And now the app works on the emulator.

接下来我再次启动 genymotion 模拟器 现在应用程序可以在模拟器上运行。

回答by yaircarreno

Sometimes there are conflicts between ADB Genymotion and ADB SDK because both of them use the same port. So I recommend always set up ADB Genymotion to use the ADB SDK, in that way to avoid incompatible issues.

有时,ADB Genymotion 和 ADB SDK 之间会出现冲突,因为它们使用相同的端口。所以我建议总是设置 ADB Genymotion 来使用 ADB SDK,这样可以避免不兼容的问题。

Genymotion-> Settings -> ADB -> Use custom Android SDK tools (here your set up your sdk android location).enter image description here

Genymotion-> 设置 -> ADB -> 使用自定义 Android SDK 工具(在这里您设置您的 sdk android 位置)。在此处输入图片说明

回答by Shangeeth Sivan

For Windows,

对于 Windows,

Close Android Studio and any of your Emulators you are using,

关闭 Android Studio 和您正在使用的任何模拟器,

then goto->TaskManager and Kill the process(adb.exe)

然后转到->任务管理器并杀死进程(adb.exe)

After finishing all these First open Android studio followed by emulators.

完成所有这些后首先打开Android工作室,然后是模拟器。

回答by Kam wave

I solved by End task "adb.exe" background process from task manager. and Start adb thats it :)

我通过任务管理器中的结束任务“adb.exe”后台进程解决了。并启动 adb 就是这样:)

回答by Manikumar Gouni

Open the Genymotion emulator after opening The Android studio.

打开 The Android studio 后打开 Genymotion 模拟器。

回答by John Fash

Just goto the task manager on your PC, and kill adb.exe, then back to your android studio. it should initialize and reconnect.

只需转到您 PC 上的任务管理器,并杀死 adb.exe,然后返回您的 android 工作室。它应该初始化并重新连接。

回答by mohammed shefeeq

Close Android studio then go to Task Manager

关闭 Android Studio 然后转到 Task Manager

  • End Taskadb.exe
  • goto Details menu
    • End Taskjava.exe and jusched.exe
  • End Task执行程序
  • 转到详细信息菜单
    • End Taskjava.exe 和 jusched.exe

now open Android Studio it will work properly

现在打开 Android Studio 它将正常工作

回答by Amit Rana Kadana

in my case one application on window use adb.exe.

在我的情况下,窗口上的一个应用程序使用 adb.exe。

that application name is mobogenie.

该应用程序名称是 mobogenie。

Fixed :: Goto Window TaskManager select adb.exe and press End process

固定 :: 转到窗口任务管理器选择 adb.exe 并按结束进程

回答by waredan waredan

disconnect any usb connected android devices. I was tethering to my laptop via my cellphone for internet connection. I got the adb start server failed error with loopback error "port is only used for one socket connection".

断开任何 USB 连接的 android 设备。我通过手机连接到我的笔记本电脑以进行互联网连接。我收到 adb start server failed 错误和环回错误“端口仅用于一个套接字连接”。

I disconnected my cellphone usb connection from my laptop and now android studio recognizes my genymotion emulator and another android device I have connected via usb in the deployment target box.

我从笔记本电脑上断开了手机 USB 连接,现在 android studio 识别出我的 genymotion 模拟器和另一个我通过部署目标框中的 USB 连接的 android 设备。