Search code examples
visual-studioxamarinadbgenymotion

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".


Solution

  • 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