简体   繁体   English

如果需要,adb.exe 启动服务器失败,请手动运行

[英]adb.exe start server failed-run manually if neccessary

When I started running my app in Android, I got a message saying that "adb.exe start server failed-run manually if neccessary".当我开始在 Android 中运行我的应用程序时,我收到一条消息,提示“adb.exe start server failed-run if necessary”。

错误1

I tried many commands shown on Stack Overflow in the command prompt, but the problem is not rectified.我在命令提示符中尝试了 Stack Overflow 上显示的许多命令,但问题没有得到纠正。 This is the error I get,这是我得到的错误,

错误2

I even reinstalled Android Studio, but in vain.我什至重新安装了Android Studio,但徒劳无功。 And my adb.exe is not found in the Task Manager.在任务管理器中找不到我的 adb.exe。
How can I solve this problem?我该如何解决这个问题?

first close android studio then press alt + ctrl + delete to open task manager then search for adb.exe , click that then press end task.首先关闭android studio然后按alt + ctrl + delete打开任务管理器然后搜索adb.exe ,点击它然后按结束任务。 this is the solution that i got from googling,but it didn't work for me.这是我从谷歌搜索中得到的解决方案,但它对我不起作用。

Then i tried this one, search for java in task manager.然后我尝试了这个,在任务管理器中搜索java end task java(services) also.也结束任务java(services) then open android studio.it will work然后打开android studio。它会工作

如果您使用的是 genymotion 模拟器来运行应用程序,那么首先运行 android studio 来解决这个问题,然后启动 genymotion。

You can see all the status using cmd.您可以使用cmd查看所有状态。 Most of the time adb's home directory ais also available in own PC home director.大多数时候,adb 的主目录 ais 也可以在自己的 PC 主目录中使用。 Such as比如

C:\\User\\USER_NAME C:\\用户\\用户名

What you have to do is first check the availability of adb.您需要做的是首先检查 adb 的可用性。 Just type and enter adb service OR adb in your cmd只需在您的 cmd 中键入并输入adb service OR adb

Then you can see adb version, where it's installed and global option and much more info.然后你可以看到 adb 版本,它的安装位置和全局选项以及更多信息。 If those info doesn't appear you should install Android Studio correctly.如果没有出现这些信息,您应该正确安装 Android Studio。

Then you can kill the adb server and start the adb serveer然后你可以杀死adb服务器并启动adb服务器

1.to kill--->> adb kill-server 1.杀死--->> adb kill-server

2.to start-->> adb start-server 2.启动-->> adb start-server

All done全部完成

只需要退出 Android Studio 并再次以管理员身份运行它:D

I haven't seen any solution as mine but I think this is similar to the answer above.我还没有看到任何解决方案,但我认为这与上面的答案相似。 As for me, this will happen then my Android Studio won't show any devices, at all.至于我,这会发生,然后我的 Android Studio 根本不会显示任何设备。 I have "search everything" software on my PC and that when I try to search adb.exe I see a lot of app crash folders.我的 PC 上有“搜索所有内容”软件,当我尝试搜索 adb.exe 时,我看到很多应用程序崩溃文件夹。 It adds a new one everytime I try to run my android program.每次我尝试运行我的 android 程序时,它都会添加一个新的。

So I go to task manager and found multiple adb runs (as much as how many times I tried to run my program).所以我去任务管理器,发现有多个 adb 运行(和我试图运行我的程序的次数一样多)。 I closed each and every one of them.我关闭了它们中的每一个。 Then, I will try to run my program again and adb will run and show my devices.然后,我将尝试再次运行我的程序,adb 将运行并显示我的设备。

Runs everytime.每次都运行。 No restart, reinstall, run, or re-download needed.无需重新启动、重新安装、运行或重新下载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM