Android 在 Xamarin 中找不到 SDK

Android SDK not found in Xamarin

我是 C# 和 Xamarin 的初学者。

我已经安装了 Visual Studio 和 Xamarin,但是当我尝试使用 Xamarin 创建一个新项目时,它在输出 window.

中显示以下错误
[I:sdk]: Looking for Android SDK..
[I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidSdkDirectory not found.
[I:sdk]: Key HKLM\SOFTWARE\Novell\Mono for Android\AndroidSdkDirectory found:
         Path does not contain adb.exe in \platform-tools (C:\android-sdk-windows).
[I:sdk]: Key HKCU\SOFTWARE\Xamarin\MonoAndroid\PrivateAndroidSdkPath not found.
[I:sdk]: Key HKCU\SOFTWARE\Android SDK Tools\Path not found.
[I:sdk]: Key HKLM\SOFTWARE\Android SDK Tools\Path found:
         Path does not contain adb.exe in \platform-tools (C:\Program Files (x86)\Android\android-sdk).
[I:sdk]: Looking for Android NDK..
[I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidNdkDirectory not found.
[I:sdk]: Key HKLM\SOFTWARE\Novell\Mono for Android\AndroidNdkDirectory not found.
[I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\JavaSdkDirectory not found.
[I:sdk]: Key HKLM\SOFTWARE\Novell\Mono for Android\JavaSdkDirectory not found.
[I:sdk]: Looking for Java 6 SDK..
[I:sdk]: Key HKLM\SOFTWARE\JavaSoft\Java Development Kit\CurrentVersion found.
[I:sdk]: Key HKLM\SOFTWARE\JavaSoft\Java Development Kit.6\JavaHome not found.
[I:sdk]: Key HKLM\SOFTWARE\JavaSoft\Java Development Kit.7\JavaHome found:
         Path contains jarsigner.exe in \bin (C:\Program Files (x86)\Java\jdk1.7.0_55).
[I:Unknown]: Did not find Android SDK
[I:sdk]: Looking for Android SDK..
[I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidSdkDirectory not found.
[I:sdk]: Key HKLM\SOFTWARE\Novell\Mono for Android\AndroidSdkDirectory found:
         Path does not contain adb.exe in \platform-tools (C:\android-sdk-windows).
[I:sdk]: Key HKCU\SOFTWARE\Xamarin\MonoAndroid\PrivateAndroidSdkPath not found.
[I:sdk]: Key HKCU\SOFTWARE\Android SDK Tools\Path not found.
[I:sdk]: Key HKLM\SOFTWARE\Android SDK Tools\Path found:
         Path does not contain adb.exe in \platform-tools (C:\Program Files (x86)\Android\android-sdk).
[I:sdk]: Looking for Android NDK..
[I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidNdkDirectory found:
         Path contains ndk-stack.exe in \. (C:\ProgramData\Microsoft\AndroidNDK\android-ndk-r10e\).
[I:sdk]: Key HKLM\SOFTWARE\Novell\Mono for Android\AndroidNdkDirectory not found.
[I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\JavaSdkDirectory not found.
[I:sdk]: Key HKLM\SOFTWARE\Novell\Mono for Android\JavaSdkDirectory not found.
[I:sdk]: Looking for Java 6 SDK..
[I:sdk]: Key HKLM\SOFTWARE\JavaSoft\Java Development Kit\CurrentVersion found.
[I:sdk]: Key HKLM\SOFTWARE\JavaSoft\Java Development Kit.6\JavaHome not found.
[I:sdk]: Key HKLM\SOFTWARE\JavaSoft\Java Development Kit.7\JavaHome found:
         Path contains jarsigner.exe in \bin (C:\Program Files (x86)\Java\jdk1.7.0_55).
[I:Unknown]: Did not find Android SDK
[I:Unknown]: Found Xamarin.Android 6.0.3

但是我在C:\Program Files (x86)C:\Users\sony\AppData\Local下找不到Android文件夹。

如果您确定Android SDK 没有安装,您将需要下载Android SDK 并进行初始安装。这是 link 到 Android SDK windows 安装程序。

安装 Android SDK 后,您需要将 Visual Studio 指向 SDK 文件夹。单击顶部工具栏中的 'Tools',然后单击 'Options'。如果未自动检测到 Android SDK 位置,请单击 'Change' 和 select 位置。

之后您可能需要重新启动 Visual Studio。