I am trying to run the sample TipCalc Xamarin (Android) application in Visual Studio, however after it compiles and I run the Android emulator, I'm told the:
adb server version (32) doesn't match this client (36)
How do I fix this? I've updated Xamarin and the Android SDK files and Xamarin is correctly pointing to my android SDK location (D:\dev\Xamarin\AndroidSDK).
Here's a screenshot of my Android SDK manager:
Here's a bigger snippet of the output:
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 Android SDK Build-tools 24.0.3 (and removing 23.0.2) didn't help.
This answers provided at this this question don't help, as I don't know what Appium or Genymotion are, nor do I work with PHP. I agree though they are both caused by the android debugger, but I need the Xamarin fix.
The issue is you have another adb server running at the same time. When you install the Android SDK it installs a version of adb that Xamarin will use (in this case version 36), but some other tools also have adb installed with them. Some examples include Gennymotion and Appium as already mentioned, in my case it came as part of Mobizen which I was using for sharing the android device screen back to my Mac. You will have something installed which runs adb (version 32) causing the conflict.
What you'll need to do is locate the offending adb install and delete it. I'm assuming you are on windows so best to fire up task manager and have a look at the processes to find adb. Once you locate it you should be able to see what app it was installed from it's properties with based on it's path, so that you can uninstall it or delete it.
Related
I am using windows 10 home and visual studio 2017. I want to develop android apps with xamarin. Hyper-V feature is not available on windows 10 home and I can not afford pro version, So emulator is not installing without hyper-v.
What should I do to develop android app?
Have anybody idea to deploy android app without using emulator and hyper-v?
Thank you in advance!
It's possible to develop Xamarin app without using the emulators. But in that case you'll need to have an Android device to deploy your app on.
Setup Android SDK Manager on your system. Although Xamarin includes a
SDK Manager, you can download it from the following link. Android SDK Manager download
Setup the ADB (Android Debug Bridge) on your system (install Google USB Drivers)
Connect your Android device to the system after you enable USB Debugging(Developer options) on it. Once the device is connected it will give you a prompt to enable debugging. Tap yes and you'll see the option to build to your device as shown in image.
You can try to use any avaliable on windows android emulator. I like to use Bluestack (https://www.bluestacks.com), the steps for use it below:
Install Bluestacks emulator
Launch emulator and wait for load finished
It's your wellcome screen, your application and apps from store will be here
Go to settings > Preferences and check "Enable android debug bridge (ADB)" + "Enable Android input debugging"
One time Setup finished
"Open android adb command promt" and type
adb connect 127.0.0.1:5555
If you have done everything good you will be connected to emulator and ready to debug your application
Good luck!
UPDATE:
As of visual studio 2019, non-hyper v emulation has been stopped.
Old Answer
I am very positive that at the time of VS installation the Visual studio emulators for Android are readily available for download and use, there you can find a good amount of android emulators also it provides you with Android SDK which again can be used to create Android emulators without using Hyper-V
The below link contains all you need to know about Visual studio emulators including on how to install :
https://msdn.microsoft.com/en-us/library/mt228279.aspx
Hope this Answers your question.
Goodluck!
I am using a MAC Book Pro and I wrote my Android App in Visual Studio using Xamarin in Parallels (virtual machine).
When starting the app, it builds, but then the "mobile screen" freezes and when I stop the application then I get two Error Messages:
-) Error ADB0010: Unexpected install output: cmd: Can't find service: package
-) Error ADB0000: Deployment failed
Mono.AndroidTools.InstallFailedException: Unexpected install output: cmd: Can't find service: package
How can I fix this?
The App looks like this when I've started it
Try the below suggestions:
Make sure you have the latest Android Emulator version running.
Try a different Android version If you're using Visual Studio 2019 like me you have to go with Android 8.1 Oreo or higher.
3.Read this: StackOverflow Question
It normally caused by that the android emulator does not run well. Please check that you have installed all the emulator package.
After that, when I get this issue, I always stop the android device, in the device manager, edit to change the disk.dataPartition.size value to ‘5000M’(You could set the value according to your device.).
In firebase documentation, only this paragraph describes how to turn on debug mode for events,
"To enable Analytics Debug mode on an Android device, execute the following commands:
adb shell setprop debug.firebase.analytics.app package_name"
however, I think that you can do it only in android studio.
How to turn on debug mode for firebase events in my Unity project?
To wrap this all up in an answer. Using the Firebase SDK, you can execute adb shell setprop debug.firebase.analytics.app package_name to enable debug mode. Adb is a the "Android Debug Bridge", which exists on your machine if you're able to load games onto a phone (either via Android Studio or via Unity).
For finding your SDK location and setting your path, it depends on the host OS and shell you're running as well as how you've installed the Android SDK. Therefore, I'll try to give OS agnostic instructions for if you selected to install the Android SDK that ships in Unity 2019 (specifically 2019.2.3f1 as installed by Unity Hub).
In this case, the path to ADB is {Unity_Installation_Directory}/PlaybackEngines/AndroidPlayer/SDK/platform-tools/adb. So the command without messing with my path or cd'ing to a weird directory would be: /Applications/Unity/Hub/Editor/2019.2.3f1/PlaybackEngines/AndroidPlayer/SDK/platform-tools/adb shell setprop debug.firebase.analytics.app package_name
Now, I have Android Studio installed and I use my .profile file to set my path on OSX (I use the fish shell, so this is a little tricky). To make that version of ADB accessible as a command as indicated by the instructions page, I have this towards the end of the file:
# Add environment variable NDK_ROOT
export NDK_ROOT="/Users/username/Library/Android/sdk/ndk-bundle"
export ANDROID_SDK_ROOT="/Users/username/Library/Android/sdk"
export PATH=$NDK_ROOT:$PATH
But this is specific enough that I posted the general solution first.
Hope this helps!
--Patrick
I have been battling with xamarine ide for a while now, I was unble to deploy my app to the emulator. Although I am a novice to xamarine IDE. The version am using is Xamarine Studio 6.3
pls I want someone to guide me here maybe I am missing something that did not allowed me to build an android app on Xamarine Studion Ide 6.3
These are the things I installed on my system to get started:
1. Xamarine Studio 6.3
2. Oracle vm virtual box (version 5.0.4)
3. Xamarine android player (XAP 0.6.5)
4. JDK 8
5. JTK for .NET (version 2.12.38)
Pls I really need your help if there is anything to install again so that I can get Xamarine IDE perfect for use to build an android app. Also if all what I have installed above are irrelevant, pls I need all the proper step here to get started. Thanks for your response.
Any device/emulator that is connected to your local instance of adb will show up in the Android Device List. If you are looking for a specific emulator such as Nexus 4(Lollipop), this was most likely provided in Xamarin Android Player or Visual Studio Emulator For Android. Both of these are now officially deprecated and removed from the default device list unless they are already running. Beforehand, they were added as default emulators that you could run straight from the Android Device List.
You can still run the emulators with their standalone programs to boot the emulators and they should appear on your device list as long as you can see them with the adb devices command.
I have recently downloaded the Xamarin packages into Visual Studio and I want to test my application on a physical device rather than an emulator. I have my LG VK815 tablet connected via USB. However, I can not get adb or the Android Device Logging to find my tablet. adb returns error: no devices found when I enter the command adb usb and returns List of Devices when I use the command adb devices, so I think it is pretty clear that my devices is not being found.
I have my the tablet's driver updated to the newest version and I have it in Developer Mode after hitting the Model Number 7 times. Am I missing something here? Nothing I find online seems to give me an answer.
I have tried following the Xamarin tutorials on their website word for word, but nothing seems to be working for me. Can anyone suggest where I can try to troubleshoot my problem?
Edit
I have the Google/usb_driver from the Android SDK but when try to update the driver of my tablet, I get this :
I have tried uninstalling the current driver, but the same one gets installed. IS there a way to force it to use the Google driver?
Edit 2
I now get this error when I tell Windows to install when I "Have the disk.."
You must install the ADB composite interface driver, by default the device is installed with standard drivers, to do development you need to use an ADB driver.
Go to your android SDK path, enter to extras\google\usb_driver and replace your device driver with the ADB composite interface one.
Right click and go to properties\Driver\Update Drive\Browse For driver software...
Next,
Click on LET ME PICK FROM LIST...and dbl clk on the firs option (i think "Have Disk...") now you can browse to where ever and select what ever.
Hope this helps.