简体   繁体   English

android studio 平台工具缺少 adb.exe

[英]android studio platform-tools missing adb.exe

Today, I clicked some update when I launch Android Stodio.今天,我在启动 Android Stodio 时点击了一些更新。 I forgot what it is.我忘记是什么了。 Then, I run some code when there is a error "8:34 PM IllegalArgumentException: Unable to locate adb"然后,当出现错误“8:34 PM IllegalArgumentException: Unable to locate adb”时,我运行了一些代码

Then, I google for few hours and still cannot solve my problem.然后,我谷歌了几个小时,仍然无法解决我的问题。 And I found that there is no "adb.exe" under my platform-tools folder.我发现我的平台工具文件夹下没有“adb.exe”。

Can someone help?有人可以帮忙吗?

my os is Window 10. I have tried uninstall Android Studio and install it back.我的操作系统是 Window 10。我尝试卸载 Android Studio 并重新安装。 It doesn't help.它没有帮助。

Edit 1: After I re-install the platform-tools, I get back the adb.exe.But, I run my program again, it does the "ADB initialization", my adb.exe file lose again.编辑 1:重新安装平台工具后,我取回了 adb.exe。但是,我再次运行我的程序,它执行了“ADB 初始化”,我的 adb.exe 文件再次丢失。

I am writing the solution which worked for me:我正在编写对我有用的解决方案:

  • go to SDK Platform Tools ;转到SDK 平台工具
  • download SDK Platform-Tools for Windows;下载适用于 Windows 的 SDK 平台工具;
  • extract zip file and copy to \\AppData\\Local\\Android\\sdk\\platform-tools .解压 zip 文件并复制到\\AppData\\Local\\Android\\sdk\\platform-tools

Had the same problem.有同样的问题。 Solution was that Avast deleted the adb.exe.解决方案是 Avast 删除了 adb.exe。 Try adding the SDK folder to your antivirus whitelist.尝试将 SDK 文件夹添加到您的防病毒白名单。

What worked for me (after having AS 2.x and AS 3.x installed and trying to get Canary 3.1 to work):什么对我有用(在安装了 AS 2.x 和 AS 3.x 并尝试让 Canary 3.1 工作之后):

Sometimes during an update/trying to sideload a new version of Android Studio, the updater/patcher screws up.有时在更新/尝试侧载新版本的 Android Studio 期间,更新程序/修补程序搞砸了。 It might delete adb after saying it will stop and update it, it might be fastboot or aapt ... whatever.它可能会在说它会停止并更新它之后删除 adb,它可能是 fastboot 或 aapt ......无论如何。

What works for me is to delete the whole sdk/platform-tools folder, restart AS and get it to redownload the entire platform tools package.对我有用的是删除整个 sdk/platform-tools 文件夹,重新启动 AS 并让它重新下载整个平台工具包。

Then start AS again and go to File->Invalidate caches/restart.然后再次启动 AS 并转到 File->Invalidate caches/restart。

If you have been updating Java, you might also want to ensure your JAVA_HOME is correct and that your AS project has been set to the correct JDK (project settings).如果您一直在更新 Java,您可能还想确保您的 JAVA_HOME 是正确的,并且您的 AS 项目已设置为正确的 JDK(项目设置)。

Yep, looks like LOTS of folks (way too many, shame on you, Google) have come up with a missing 'adb.exe' symptom.是的,看起来很多人(太多了,对你感到羞耻,谷歌)想出了一个缺少“adb.exe”的症状。 (In my case, I claim that it never got installed at all, during my Windows-10 bundled installation of Android Studio, version 3.1.2.) (就我而言,我声称在我的 Windows-10 捆绑安装 Android Studio 版本 3.1.2 期间根本没有安装它。)

Ok, here's my recommended solution (which I borrowed and modified slightly from this question): Android Studio SDK installer hangs indefinitely at Unzipping 'platform-tools/systrace/NOTICE'好的,这是我推荐的解决方案(我从这个问题中借用并稍加修改): Android Studio SDK 安装程序在解压缩“平台工具/系统跟踪/注意”时无限期挂起

The second(?) answer is essentially correct..."Dx Arout" boldly and correctly recommends:第二个(?)答案基本上是正确的......“Dx Arout”大胆而正确地建议:

(1) Delete platform-tools from this location C:\\Users\\AppData\\Local\\Android\\Sdk (1) 从这个位置删除platform-tools C:\\Users\\AppData\\Local\\Android\\Sdk

and he/she's got the right idea, to then launch Android Studio and try to get it to complain and offer to fix the problem for you...says to:他/她有正确的想法,然后启动 Android Studio 并尝试让它抱怨并提供为您解决问题...说:

(2) Then restart Android Studio. (2) 然后重启Android Studio。 After gradle build finish it will ask for installation of missing tools. gradle 构建完成后,它会要求安装缺少的工具。 just click there.只需点击那里。 It should work fine.它应该可以正常工作。

Well, no, not quite.嗯,不,不完全是。 It didn't ask me anything, because I didn't get any errors from current proj's build.它没有问我任何问题,因为我没有从当前项目的构建中得到任何错误。 So, I had to 'kick-it-in-the-*ss', by launching Tools -> SDK Manager, choosing the middle tab ('SDK Tools'), and going to an already-installed entry named 'Android SDK Build-Tools 28-rc2' (your exact version entry may be somewhat different).因此,我必须通过启动工具 -> SDK 管理器,选择中间选项卡(“SDK 工具”)并转到名为“Android SDK 构建”的已安装条目来“启动它” -Tools 28-rc2'(您的确切版本条目可能略有不同)。 So, click on its checkbox, choose 'Show package details' checkbox (down in lower-right corner).因此,单击其复选框,选择“显示包详细信息”复选框(在右下角)。 I lit up ALL the package variants, and forced it to install them all.我点亮了所有软件包变体,并强制它安装所有这些变体。 That may have been overkill, but voila...once that completed, 'adb' DID get installed, as confirmed when I launched a debug run.这可能有点矫枉过正,但是瞧...一旦完成,'adb' 就被安装了,正如我在启动调试运行时所确认的那样。 (Down in the 'logcat' tab's log-message window, the two RED headings, finally turned to black and debugging was finally USEABLE! (在“logcat”选项卡的日志消息窗口下方,两个红色标题终于变成黑色,调试终于可以使用了!

Cheers...干杯...

it's easy just go to your sdk location like C:\\Users\\User\\AppData\\Local\\Android\\Sdk只需转到您的 sdk 位置,例如C:\\Users\\User\\AppData\\Local\\Android\\Sdk

there was to folder namely platform-tools and platform-tools.backup .有一个文件夹,即platform-tools 和 platform-tools.backup open platfrm-tools.backup and copy the adb.exe and paste it to plaform-tools folder and now open the android studio again.studio will run smoothly and without any error Thank you打开platfrm-tools.backup并复制adb.exe并将其粘贴到plaform -tools文件夹,现在再次打开 android studio。studio 将顺利运行,没有任何错误谢谢

I also faced the issue.我也遇到了这个问题。

The avast antivirus had moved the file adb.exe to the virus chest and that was the cause of the issue. avast 防病毒软件已将文件 adb.exe 移至病毒箱,这就是问题的原因。 I have resolved it by restoring the adb.exe from the virus chest of avast.我已经通过从 avast 的病毒箱中恢复 adb.exe 来解决它。

Re-installing Android SDK Platform-Tools worked for me.重新安装 Android SDK Platform-Tools 对我有用。

  1. Go to: Android Studio >> Tools >> SDK Manager >> Appearance & Behavior >> System Settings >> Android SDK >> SDK Tools转到:Android Studio >> Tools >> SDK Manager >> Appearance & Behavior >> System Settings >> Android SDK >> SDK Tools
  2. Uncheck Android SDK Platform-Tools >> apply取消选中 Android SDK Platform-Tools >> apply
  3. Check Android SDK Platform-Tools >> apply检查 Android SDK Platform-Tools >> apply

在此处输入图片说明

The problem is solved.问题已经解决了。 The issue I have is I upgraded the SDK platform-tools to 25.0.6.我遇到的问题是我将 SDK 平台工具升级到 25.0.6。 But My SDK Build-Tools is 25.0.3.但是我的 SDK Build-Tools 是 25.0.3。 (25.0.6 is not yet provided) I guess the version did not match which cause this problem. (尚未提供 25.0.6)我猜版本不匹配导致此问题。

I downgrade my SDK platform-tools to 25.0.3 and it is working as usual.我将我的 SDK 平台工具降级到 25.0.3,它像往常一样工作。

adb.exe won't appear if antivirus is installed and we need to whitelist this.如果安装了防病毒软件,则不会出现 adb.exe,我们需要将其列入白名单。 Anti virus block this because as it find .exe file so it will block it.防病毒程序会阻止它,因为它会在找到 .exe 文件时阻止它。

system deleted that file from platform tools u just make another copy of platform tools and whenever your system deleted your " adb.exe " .系统从平台工具中删除了该文件,您只需制作平台工具的另一个副本,并且每当您的系统删除您的“adb.exe” you can copy it to sdk/ platform .您可以将其复制到 sdk/ platform 。

this is a temporary solution i installed Quick Heal but its doesn't solve my problem这是我安装了 Quick Heal 的临时解决方案,但它不能解决我的问题

adb.exe is virus file for that its detected as malware adb.exe 是病毒文件,因为它被检测为恶意软件

** **

Solution 2 :解决方案2:

** Copy your SDK FOLDER in System folder where antivirus dont take action on it . ** 将您的 SDK 文件夹复制到防病毒软件不会对其采取措施的系统文件夹中。

** **

  • Solution 3: 1.Download new copy of Platform Tools解决方案3: 1.下载平台工具的新副本

    2.paste it into SDK 2.粘贴到SDK

    3.right click on adb.exe and go to security tab 3.右键单击adb.exe并转到安全选项卡

    4.disable access of deleting by user system USERGROUP 4.禁止用户系统USERGROUP删除权限

Solution 4解决方案4

copy sdk in appdata/local it will solve your problem permanent .在 appdata/local 中复制 sdk 它将永久解决您的问题。

Thank You谢谢

no adb found.没有找到亚行。 I had to delete the virtual device from AVD manager create another.我不得不从 AVD 管理器中删除虚拟设备创建另一个。 now virtual device connected succesfully现在虚拟设备连接成功

暂无
暂无

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

相关问题 未找到DDMS文件Android \\ platform-tools \\ adb.exe - DDMS Files Not Found Android\platform-tools\adb.exe Adb.exe文件从平台工具中自动删除 - Adb.exe file auto deleted from platform-tools Android / sdk / platform-tools / adb start-server'失败 - 必要时手动运行并且adb.exe已停止工作 - Android/sdk/platform-tools/adb start-server' failed — run manually if necessary And adb.exe has stopped working 无法从平台工具文件夹路径运行 adb.exe - Unable to run adb.exe from platform-tools folder path platform-tools \\ adb.exe:Comman d失败,退出代码为3221226356 - platform-tools\adb.exe: Comman d failed with exit code 3221226356 尝试运行 AVD 时“找不到 ADB” - 路径中的 adb.exe,重新安装了平台工具,并且没有安装防病毒软件 - 'unable to locate ADB' when trying to run AVD - adb.exe in path, platform-tools reinstalled, and no antivirus installed 无法运行程序“C:\\Users\\admin\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe”:CreateProcess 错误=193,%1 不是有效的 Win32 应用程序 - Cannot run program “C:\Users\admin\AppData\Local\Android\Sdk\platform-tools\adb.exe”: CreateProcess error=193, %1 is not a valid Win32 application android SDK 中缺少 platform-tools\\aapt.exe 目录 - platform-tools\aapt.exe directory missing in android SDK 在Mac OSx上安装Android Studio时缺少平台工具 - Missing platform-tools when installing Android Studio on Mac OSx Android SDK已安装,但adb.exe缺失 - Android SDK Installed, but adb.exe Missing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM