Can't setup Android SDK on Visual Studio 2015 - xamarin

I just installed my VS2015 enterprise and I want to try "cross platform" or "Android blank App" project, but in both , I got a message box with this error
Value cannot be null
Parameter name:path1
When I try to run Tools/Android /Android SDK Manager I got a Visual Studio error:
Error: Command did not execute uccessfully due to an unexpected exeption.Please check the output window for aditional information
In the error window I got
Xamarin.Android for Visual Studio requires Android SDK. Please set Android SDK path on Tools->Options->Xamarin->Android Settings menu
When I open start/all programs/Android SDK tools/SDK Manager/tools/options
After a while I got this:
It looks like it can't download something, I guess there is no Android SDK installed on my PC.
I've tried disabling my firewall but it's the same, any idea?

Your JDK and Android NDK Locations paths might be properly set but SDK might be not set. Even i had the same problem. I solved it in three steps . If you have the same problem as shown above Image, then follow these steps.
Click on Change, it will show Folders.
Select this Path ****C:\Program Files (x86)\Android\android-sdk****
For all the systems, the SDK will be located in this location only.
Click on Ok. now your Android SDk manager will be in Enable. Your Problem will solve.
Incase your android-sdk not located in this place, then you need to search for android-sdk where it is located.
If you dont find android-sdk in C Drive, it may not be installed properly.
Here we have two Options.
Open vstoolsforxamarin.exe and select the tools which we need and update them (or)
You can install android-sdk manually.
here is the link: https://developer.xamarin.com/guides/android/getting_started/installation/windows/manual_installation/.
My suggestions is don't Uninstall and install VS, its unnecessary headache.

Looks like there is ANDROID SDK manager installed in your machine.
I have same problem with this because our network are behind proxy. What I do is fill in the HTTP proxy server IP and port. Then try to update the components one more time.
This time you will prompted to key in the user name and password for every component that is currently being installed.
Somehow still failed.
So my another attempt is just key in the user name with a blank password. And then its working, and updated of ANDROID SDK components has been done successfully.

I set the path like this: C:\Users\{username}\AppData\Local\Android\Sdk
and the problem solved.
I found the solution in this link.
https://developer.xamarin.com/guides/android/troubleshooting/questions/android-sdk-location/

The adb.exe should be available in android sdk folder. If it is not there then Visual Studio will not detect it.

Related

Could not find SDK "WindowsMobile, Version=10.0.18362.0" error in VS17 when deploying to HoloLens

I'm new to HoloLens (and Microsoft's ecosystem) and am following this tutorial to learn. One of the steps is to deploy from Visual Studios to HoloLens, but when I try to I get this run-time error.
I have confirmed that I have followed this guide from Microsoft to set up my development environment, but my error still persists.
In Unity, these are by build settings and Player settings as instructed in the tutorial:
My Windows 10 computer is running on 1903, my HoloLens is on 1804, and I have both Windows SDK 10.0.17x and 10.0.18x installed on my computer (via Visual Studios installer and this link). I have also tested deploying the app using the 10.0.17x SDK, but end with the same results.
I can simulate my app from Unity using the Holographic Remoting app in HoloLens, but I just can't deploy it from Visual Studios. What is causing this error and how can I solve it?
Update:
I have tried re-installing the Windows 10 SDK (both 10.0.17x and 10.0.18x), but this did not resolve the problem. My Windows 10 SDK is installed in my D: drive if that would make any difference.
Update 2:
I read somewhere that if you simply delete those files from the project tree in Visual Studios, the error will go away. Indeed it did and I could build and run just fine after that seemly without issue, but there must be something wrong with deleting SDK files like that... Is deleting them safe?
Thank you for your help!
I managed to get this to work by deleting the reference to the Mobile SDK in the vxcproj file. It doesn't seem to be required!
App deployed to Hololens successfully!
According to the error message from the picture you post, there seems to be a problem with your Windows 10 sdk. Please check if the files in this directory are damaged (C:\Program Files (x86)\Windows Kits\10\Extension SDKs\WindowsMobile\10.0.18362.0), and try to reinstall the Windows10 SDK:https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk

Windows SDK UWP App Error - DEP3321

I have been battling DEP3321: To deploy this application, your deployment target should be running Windows Universal Runtime version 10.0.14393.0 or higher. You currently are running version 10.0.10586.839. Please update your OS, or change your deployment target to a device with the appropriate version. for the past few days.
I have a UWP app which I cannot run on my machine. However, if I select one of the emulators, it runs fine. I have also set the minimum target value which ensures that the app runs, however, the app throws an error as it cannot find some methods in the lower version on the SDK.
I have tried repairing and uninstalling/re-installing both visual studio 2015 and 2017. I have tried the same with the various windows SDK as well. At one point i had three different versions of the SDK installed and visual studio was still complaining even though i had the updated version installed. Currently, I have installed win sdk 10.0.15063.17.
Any ideas what I can do next to resolve this issue. I have trawled various SO pages as well social.msdn pages with no luck.
Many thanks
I just started a new app and selected the highest Target levels and got this error. I was able to get rid of this error by selecting the default minimum Min Target Version as shown below.
I also encountered the same problem
Severity Code Description Project File Line Suppression State
Error DEP3321: To deploy this application, your deployment target should be running Windows Universal Runtime version 10.0.17763.0 or higher. You currently are running version 10.0.17134.648. Please update your OS, or change your deployment target to a device with the appropriate version.
Solution:
Right click on the project property and got to the General-> Target Platform Minimum version.
In my case, I changed it to "10.0.17134.0" by selecting from the drop-down and then rebuilt it.
I worked well. Attached snapshot for reference.
If your app is using APIs that only exist in newer versions of the OS (like 14393 or 15063), then you won't be able to call those on 10586. You will get an exception because the method simply doesn't exist on that machine.
In order to support the app on lower versions of the operating system you will need to wrap the calls to those APIs with an appropriate "IsAPIPresent" check:
https://learn.microsoft.com/en-us/uwp/api/Windows.Foundation.Metadata.ApiInformation
Thanks,
Stefan Wick - Windows Developer Platform
Possible Solution:
I was facing with the EXACT same issue. I have my SDK 15063, and I have installed Visual Studio 2017 afresh, which also installed SDK 15063 implicitly, but I still kept on getting the same deployment error DEP3321.
I solved this issue in this way -
Just go to the "Solution Explorer", on the right side of Visual Studio and do the following steps in this order -
1) Just right click on the project you are deploying
2) Press "Unload Project"
3) Right click on the project_name(unavailable) and press Edit project_name.jsproj. It will open an xml file on left hand side
4) Search for "TargetPlatformVersion" and "TargetPlatformMinVersion". Both are placed next to each other. Mine looked like this -
10.0.15063.0
10.0.15063.0
since mine Error DEP3321 explicitly stated that 'you are currently running version 10.0.14393.1715, so I replaced my "TargetPlatformMinVersion" from 10.0.15063.0 to 10.0.14393.1715 -
10.0.14393.1715
5) Now save it, Ctrl+S
6) Right click on "Solution Explorer" and press Reload Project and press Yes to the popup if you get stating that project is already loaded.
You are done. Just do what you normally do, Build (ctrl+shift+B) and then Debug - F5 or Ctrl+F5.
This way the project got deployed for me.

Visual Studio: Android SDK Setup (API Level 19 and 21,22,23)

I have this problem with the setup of Android SDK in Virtual Studio Community 2015. Whenever I try to install or repair VS, I always get problems with the setup of API Level 19 and 21,21 and 23. It always says that the packages were not downloaded and I should check my internet connection. However, my internet connection is working perfectly. I have seen many other users having similar problems, but none of the proposed fixes work for me. I have reinstalled VS twice and repaired it like 3 or 4 times. I checked my Java version and my proxy settings or tried installing them via the Android SDK Manager/alongside Android Studio. So far without any luck. I hope I have not overseen any fixes.
Unfortunately, the log is very long, so I can´t post it here (if you have any suggestions where I can post it, please tell me!). In the links you will find two screenshots of the error message I get.
Can you help me?
All I did was install Java SE Development Kit 8u151 from Oracle (Apparently VS 2015 uses Java 7 instead of 8) and then run VS 2015 as administrator and modify. The third party SDK's (19, 21, 23 & 22) were available and all installed correctly. Wish I had of known this before multiple installs and eventually a reinstall of my OS ...suppose I could have done with a clean slate though.
I was able to solved the problem above using the suggestion and comment of #Richard_Norton and #bugzapper from, https://social.msdn.microsoft.com/Forums/sqlserver/en-US/780c0b11-41da-4935-9ae5-dadf38292b51/android-sdk-setup-api-not-installed?forum=vssetup .
I uninstall the older version of Java SE Development Kit which is not Version 8.
I download and install the Java SE Development Kit Version 8 which you can get in here http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html .
Then after that i modify Visual Studio 2015 to Install Android SDK Setup (API Level 19 and 21), and 23.
I Hope, this answer can help future someone who is encountering this kind of problem.
Refer to the error message, you can have a try with the following methods:
Open Android SDK Manager and click Tools-Options… and check the option “Force https://... Sources to be fetched using https://...” and try to download those android SDK packages again. If you already tried this before, you can ignore it.
Check this blog: Visual Studio 2015 install failures (Android SDK Setup) behind a Proxy and follow the steps as below to fix it:
• BEFORE installing Visual Studio, create a file at this location: %USERPROFILE%.android\androidtool.cfg
• In the androidtool.cfg file that you just created, place those contents that you can find from the blog. Make sure to update “http.proxyPort” and “http.proxyHost” in the file!
• Install Visual Studio normally
Have a look at this similar issue: Visual Studio 2015 setup issue with Android SDK – hack it!, if you found the same root cause: all google repositories don’t have this package anymore on your side, you can try to create your own repository contains this missing package and let Visual Studio setup “think” he download the package and unzip it successfully.
BTW, the installation log file can upload to https://onedrive.live.com/ and share the link here.
Just start the SDK Manager from Visual Studio's menu (Tools/Android/Android SDK Manager...) and select the desired API level you do want and download them!
Anyhow, check with the SDK Manager, this is THE tool to get the Android SDK and at times you will need to update stuff through it!

Deployment error in Visual Studio 2015 while running Xamarin app

I am running visual studio application on genymotion virtual machine. But it shows deployment errors while debugging. It seams it is something with the emulator. I know there are similar questions but none of them solve the problem. Anyone for help?
error occurred:
A numeric comparison was attempted on "$(_DeviceSdkVersion)" that evaluates to "" instead of a number, in condition "$(_DeviceSdkVersion) >= 21".
Solved ( genymotion users)
Go to Genymotion select the virtual device you are using.
Settings>>ADB>>Select the option "Use Custom Android SDK tools">>copy and paste the same location your sdk (like in Visual Studio >>Android Settings >>Android SDK Location
restart genymotion. It worked for me!
Solution actual for emulator, but not for devices. Solution for devices - kill all shuame_helper.exe processes, that takes TCP-port which is required to poll the device's SDK version... Shuame_helper.exe raised every time you reconnect your device to PC..
I seams the problem is with genymotion: there are different paths of SDK path in visual studio and genymotion.
Solution:
First go in Visual Studio-> Tools -> Options. In options choose Xamarin->Android settings. Copy the path in part: Android SDK Location.
Then open genymotion. Choose virtual machine that you will be using. Than settings->ADB-> use custom Android SDK tools, and paste the path there. If you get message that says Android SDK tools found successfully. Close the window and then restart Visual Studio and run your application again.
For more details look at this link
http://enblog.clock-up.jp/entry/2016/06/26/xamarin-android-device-sdk-version-error

how to install framework SDK(.NETCore, version=v5)

I recently installed Visual Studio 2015 Community for universal app development, but when ever I create a new project and select the universal app under windows the error pops up saying:
"One or more projects requires a framework SDK(.NETCore v=5.00) that
is either not installed or is included as part of a future update to
visual studio"
In that error box there is a hyperlink mentioned to download the update but it goes right to the Microsoft website's home page.
I read some where to install the .NETCore via nuget package manager console. I have done that it was successful, but again whenever I create a new project it says to install the Framework SDk(.NETCore v5).
I haven't found any solution on this particular error but their were some tutorials to install the .NETCore but they didn't helped me out.
Kindly tell me how to get rid of this, I have wasted almost my 5 days trying to fix this issue.
i actually fixed that issue by First Modifying the setup of vs and their unchecking the Window Universal App development option. it means uninstalling the universal Window App development from visual studio then again modifying the setup i re checked the universal window App development option and update it. that fixed my issue.
You have to install the "Tools and Windows SDK."

Resources