重新安装Windows/Visual Studio 2015/Xamarin-找不到Android SDK [英] Reinstalling Windows/Visual Studio 2015/Xamarin - Cannot find Android SDK

查看:86
本文介绍了重新安装Windows/Visual Studio 2015/Xamarin-找不到Android SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重新安装Windows/Visual Studio 2015/Xamarin后,由于Xamarin无法找到Android SDK,我无法再编译Android项目.

After reinstalling Windows/Visual Studio 2015/Xamarin I can no longer compile Android projects as Xamarin cannot locate the Android SDK.

我通过Xamarin安装程序将Android SDK安装到默认路径(AppData),并且从屏幕截图中可以看到,该路径已正确配置.

I installed the Android SDK via the Xamarin installer to the default path (AppData) and as you can see from the screenshot the path is configured correctly.

运行构建时,尽管 Android SDK位置设置指向,但Xamarin正在搜索的Android SDK路径位于 Program Files(x86)中时,出现以下错误到AppData.

When I run a build I get the following error as the Android SDK path Xamarin is searching for is in Program Files (x86) despite the Android SDK location setting pointing to AppData.

未找到Android平台.请单击此处打开SDK Manager并安装Android SDK平台.

No Android platform found. Please click here to open the SDK Manager and install an Android SDK Platform.

如何配置Xamarin在AppData中使用Android SDK?

How can I configure Xamarin to use the Android SDK in AppData?

其他信息:

HKEY_LOCAL_MACHINE \ SOFTWARE \ WOW6432Node \ Android SDK Tools \ Path 也指向AppData

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools\Path is also pointing to AppData

我认为它不相关,但是我使用了Windows 10重置&重新安装保留文件"功能,也许它留下了一些与新安装相冲突的剩余配置...

推荐答案

  1. 确认您已安装正确的android api级别.在您的情况下,Android API级别为25.将Xamarin设置中的确切android-sdk路径复制到资源管理器地址中.然后从那里导航到平台子文件夹,以确保将其安装在该确切位置,例如android-sdk \ platforms \ android-25?我知道程序文件x86错误,但是请检查android-25文件夹是否在您指定的sdk路径中.

  1. Confirm you have correct android api level installed. In your case android API level 25. Copy your exact android-sdk path from Xamarin settings into explorer address. and then navigate into the platforms subfolder from there to ensure it is installed in that exact location e.g. android-sdk\platforms\android-25? I know there is a program files x86 error but please check android-25 folder is in your specified sdk path.

尝试在C:\ Program Files(x86)\ Microsoft XDE中运行xdecleanup.exe

Try run xdecleanup.exe in C:\Program Files (x86)\Microsoft XDE

(我知道您已经尝试过此方法,但是为了确保回答的健壮性),请确保HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Android SDK Tool指向正确的sdk位置

(I know you have tried this but for answer robustness sake) Ensure HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tool points to the correct sdk location

重新启动计算机,然后尝试进行彻底的重建

restart your pc and try a clean rebuild

这篇关于重新安装Windows/Visual Studio 2015/Xamarin-找不到Android SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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