I am attempting to play around a little with xamarin within Visual Studio 2019. I built a new Xamarin Android application and just want to run the base code in the emulator, but I am getting the error in the image below. When I installed VS2019, I did so with the xamarin features including the SDK on my secondary drive and I can see the sdk file on my secondary drive, but am fairly sure that VS2019 is looking with my primary drive for some reason. Is there a way to fix this?
I don't bother with the SDK or emulator packages through the visual studio installer anymore. Install Android Studio, use the tools in that to download the SDK and setup the devices you want to emulate. Then back in Visual Studio, set the paths in the Xamarin/Android Settings in the options menu. Mine look something like this:
Android SDK Location: C:\\Users\\myusername\\AppData\\Local\\Android\\Sdk
Android NDK Location: C:\\Users\\myusername\\AppData\\Local\\Android\\Sdk\\ndk-bundle
This setup seems to have much support for Android and gives you the various Google apps and services in the emulators.
Fist, you should check your android sdk path by Tools
> Options
> Xamarin
> Android Settings
to view and set the Android SDK location: For more details, you can check here .
Meanwhile, you should check the Android SDKs and Tools
by steps: Tools
-> Android
-> Android SDK Manager...
,then you need install the platforms and Tools you need.Eg
It seems a little bit late, but I faced this issue and I did the following to sort it out:
Hope this may help
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.