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
Related
I work from home and for my job I am using Visual Studio 2022 on Windows paired to a MacinCloud running Big Sur using my company's Apple Developer account for Xamarin development.
In the evenings, I'm playing with MAUI so I'm running the Visual Studio 2022 "Preview" version and I have my own Apple Developer account and my own separate MacinCloud running Monterey.
When I open Visual Studio (either version) it looks like it just tries to pair to the last Mac I used and then it also tries to install updated SDK's etc. if necessary.
How do I manage this? Ideally I want to stop it from auto-pairing and then choose the correct Mac each time.
Thanks in advance,
Paul Lonsdale.
You can open Tools - Options - Xamarin - iOS Settings on Visual Studio on Windows computer. On the Pair to Mac dialog window select "Forget this connection" (right click context menu on the connection).
This isn't really an answer but a workaround. The issue only really happens when both macs are running which is rarely the case. I will, in future, make sure that only the mac I need for the project I am working on is up and running. That way even if VS tries to connect to the other one it will fail.
I am trying to deploy a simple unity app to the Hololens v2 emulator. I followed some tutorials to build the unity files according to the Hololens build framework. The tutorials on Microsoft show there being an option in visual studio 2019 to connect the debugger to the hololens v2 emulator application, but no such option exists on my installation of Visual Studio, despite it being within the stated requirements, version 19.2 or later. Mine is 19.11
My version of Visual studio is 19.11, which should meet the requirement of 19.2 or later
here: https://learn.microsoft.com/en-us/windows/mixed-reality/develop/platform-capabilities-and-apis/using-visual-studio?tabs=hl2
It is shown having an option to target the emulator directly, and an option to target a remote device if using a physical hololens. I have neither option in my debug settings.
What the tutorials show
What my visual studio shows
I attempted to set it up like the remote machine setup shown in the tutorial, getting the correct hololens machine name by accessing the ip address of the emulator, but to no avail, it refuses to connect
It compiles properly, but then comes up with this error when run with those settings (with the correct machine name rather than a filler like I have in the image)
Does anyone have any ideas as to how to fix this? I have updated visual studio multiple times already.
Please make sure the correct project has been selected for the startup project. To change the startup project, you should navigate to Solution Explorer, right-click the desired project and choose Set as StartUp Project from the context-sensitive menu that is displayed.
After installing windows 10 update whenever launching an android emulator I get
Could anybody advice what do to? How do you reinstall the sdk,remove it
many thanks
Try the obvious first - restart the Visual Studio and the PC.
If that doesn't work then try selecting Tools->Android->Android Device Manager and play around from there. Try creating a new instance of a different device. Google Pixel or Nexus for example.
Try different options from there.
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.
I recently, upgraded to Windows 10 and got Visual Studio 2015 Community hoping to build UWP apps and ASP.Net 5 apps. At first, I installed everything, but ended up skipping / canceling the Windows 8.1 / 10 mobile emulators (my PC can't even run them). After everything was installed, I went to create a new UWP app (C#), and got this error:
Next, I try the same thing, but with JavaScript. It works perfectly! on the same UAP 10.0.0.0 that is supposedly missing. The link it provides is completely useless (it sends me to http:/microsoft.com/en-us) -_-. Oddly, this only happens when I try to use C# or VB.Net, JavaScript UWP apps seem to work fine. What is going on here? Where can I find the real link to the SDK I need?
UPDATE
JavaScript UWP apps will be create just fine, but when I attempt to build, I get:
Error "10.0.0.0" is not a supported value forTargetPlatformVersion.
Please change it on the Project Property page. Test
C:\Program Files (x86) \MSBuild\Microsoft\VisualStudio\v14.\JavaScript\Microsoft.VisualStudio.JavaScript.UAP.targets
This is the download link for the standalone SDK, maybe reinstalling the sdk will fix the problem.
https://dev.windows.com/en-us/downloads/windows-10-sdk
Normally you don't always have to reinstall visual studio when something goes wrong because it takes a lot of time to reinstall again. From your question you skipped/cancel that feature, the first thing to do is go to the control panel and double click on visual studio under programs to Modify the software and enable those features.
In the case, visual studio was working properly before but due to some updates it stopped, go to control panel right click the visual studio version you have under programs to repair.
If the above doesn't work try to reinstall it again. I hope this helps.