使用 Xamarin 将 Android SDK 移动到另一个文件夹 [英] Moving Android SDK to another folder with Xamarin

查看:39
本文介绍了使用 Xamarin 将 Android SDK 移动到另一个文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 Android SDK 从默认文件夹 (C:\Program Files (x86)\Android\android-sdk) 移动到另一个驱动器.我已经将 VS 选项中的以下项目更改为新路径:

I'm trying to move Android SDK from default folder (C:\Program Files (x86)\Android\android-sdk) to another drive. I already changed the following items in VS options to new path:

  • 工具 |选项 |Xamarin |Android SDK 位置
  • 工具 |选项 |跨平台 |C++ |安卓 |Android SDK

但是,出于某种原因,Visual Studio 仍然尝试从旧位置运行 ADB.我在哪里可以配置新的?

However, for some reason, Visual Studio still tries to run ADB from the old location. Where can I configure the new one?

ProcMon 日志

ProcMon log

08:34:09,2974468    devenv.exe  9548    CreateFile  C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe   PATH NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
08:34:09,2975321    devenv.exe  9548    CreateFile  C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe.exe   PATH NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a

推荐答案

试试这个:

通过从开始"按钮上下文中选择运行"来打开注册表编辑器菜单,在对话框中键入 regedit,然后选择确定.导航HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools 在左侧的文件夹树.修改 Path 注册表变量以匹配Android SDK 的路径.

Open Registry Editor by selecting Run from the Start buttons context menu, typing regedit in the dialog box, and choosing OK. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools in the folder tree on the left. Modify the Path registry variable to match the path to your Android SDK.

来自:https://msdn.microsoft.com/en-us/图书馆/mt228282.aspx

它应该可以工作.

这篇关于使用 Xamarin 将 Android SDK 移动到另一个文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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