运行Visual Studio 2015 RC和MS Android模拟器时找不到adb.exe错误 [英] Error locating adb.exe when running Visual Studio 2015 RC and MS Android emulator

查看:68
本文介绍了运行Visual Studio 2015 RC和MS Android模拟器时找不到adb.exe错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS 2015 RC,并且正在编写一个跨平台的移动应用程序.我已经安装并可以正常使用所有普通工具(java,android sdk,xamarin,cordova等).一切发展顺利.我可以调试就好了.Windows Phone 8.1模拟器的运行和调试非常出色.iOS模拟器运行和调试都很棒.

I'm using VS 2015 RC, and I'm writing a cross platform mobile application. I have all the normal tools (java, android sdk, xamarin, cordova, etc.) installed and working. All the development is going well. I can debug just fine. Windows Phone 8.1 emulator run and debugs great. iOS simulator runs and debugs great.

当我尝试运行MS Android模拟器(来自VS的调试)时,我的项目成功构建(创建了.apk),Android模拟器启动并启动了模拟器OS.

When I try to run the MS Android Emulator (debug from VS), my project builds successfully (.apk gets created), and the Android emulator launches and starts the emulator OS just fine.

但是,在MS Android仿真器启动后,出现一个弹出窗口,提示找不到Android调试桥(adb.exe)".我的应用程序从不显示在模拟器屏幕上,VS告诉我部署失败.

However, after the MS Android emulator starts, I get a pop up saying "Could not locate Android Debug Bridge (adb.exe)". My application never shows up on the emulator screen, and VS tells me deployment failed.

adb.exe已安装并且可以正常运行(D:\ Program Files(x86)\ Android \ android-sdk \ platform-tools \ adb.exe).我可以转到命令提示符,然后从任何位置(在系统PATH中)执行它.ADB可以通过命令提示符,检测设备以及一切正常的方式正常工作.只是通过VS才可以出错.

adb.exe is installed and working just fine (D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe). I can go to command prompt, and execute it from anywhere (it's in my system PATH). ADB will work generically thru command prompt, detect devices, and everything just fine normally. It's only thru VS does it error out.

VS在哪里可以找到adb.exe?可能与我选择在D:驱动器(而不是C :)上安装Android SDK(包括adb.exe之类的工具)有关吗?

Where could VS be looking for adb.exe at? Could it be related to me choosing to install the Android SDK (including tools like adb.exe) on my D: drive (not my C:)?

推荐答案

Visual Studio使用注册表项来标识Android SDK的安装位置.转到运行> regedit,然后导航到HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Android SDK Tools.VS用于查找"SDK"的是路径"条目,因此您可能需要对其进行修改以匹配您的SDK的安装位置.另外,请确保您的android-sdk文件夹具有\ platform-tools \ adb.exe

Visual Studio uses a registry key to identify where the Android SDK is installed. Go to Run > regedit and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools. The "Path" entry is what VS uses to find the SDK, so you may need to modify it to match where your SDK is installed. Also make sure that your android-sdk folder has \platform-tools\adb.exe

这篇关于运行Visual Studio 2015 RC和MS Android模拟器时找不到adb.exe错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆