Cannot debug Xamarin Android application in VS using ADB

I am trying to run the TipCalc Xamarin (Android) sample application in Visual Studio, however after compiling it and launching the Android kernel, they tell me:

adb server version (32) does not match this client (36)

How to fix it? I updated the Xamarin and Android SDK files, and Xamarin correctly points to my location of the Android SDK. ( D:\dev\Xamarin\AndroidSDK ).

enter image description here

Here is a screenshot of my Android SDK manager:

enter image description here

Here's more output snippet:

 1>D:\dev\Xamarin\AndroidSDK\platform-tools\adb.exe -s 169.254.138.177:5555 devices 1>error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: Only one usage of each socket address (protocol/network address/port) is normally permitted. (10048) 1>List of devices attached 1>adb server version (32) doesn't match this client (36); killing... 1>could not read ok from ADB Server 1>* failed to start daemon * 1>error: cannot connect to daemon 1> 1>Selected device is not running. 1>Build FAILED. 

Update: installing the Android SDK Build-tools 24.0.3 (and uninstalling 23.0.2) did not help.


These answers presented in this question do not help, since I do not know what Appium or Genymotion is, and I do not work with PHP. I agree, although both of them are called by the android debugger, but I need a Xamarin fix.

+5
source share
1 answer

The problem is that you are using a different adb server at the same time. When you install the Android SDK, it installs the adb version that Xamarin will use (in this case version 36), but some other tools also install adb with them. Some examples include Gennymotion and Appium, as already mentioned, in my case it was part of Mobizen, which I used to share the screen of an Android device on my Mac. You will have something installed in which adb is running (version 32), causing a conflict.

What you need to do is find the adb install attacker and remove it. I assume that you on Windows best run the task manager and look at the processes to find adb. After you find it, you can see which application was installed from its properties based on this path so that you can remove it or delete it.

adb.exe process adb properties showing full path

+6
source

Source: https://habr.com/ru/post/1257940/


All Articles