Greetings,
I am using Xamarin.Android 4.10.1 with VS2012, and I cannot get any of my Android devices to show in the Xamarin.Android toolbar drop down. I have the vendor USB drivers installed, the devices are in developer mode, and USB Debugging is enabled. I can see the device in Windows explorer and transfer files to and from, so the connection to Windows is good. However no amount of Window restarts and closing and opening Visual Studio will get a device to show in the toolbar drop down.
Also I can open your Android Device Logging and select one of my devices from there to see the log messages, so Xamarin.Android can clearly see the device and communicate with it. However since they never show in the drop down I can't deploy and debug to the devices. When I hit F5 I get the "Device Unavailable" Dialog showing the selected emulatore as not running, however below that it shows my devices as available. Just as text not selectable or actionable in anyway. So again Xamarin can see the devices!
Posts
Updated:
After an additional random number of Visual Studio restarts the devices finally showed up. This shouldn't require any restarts, as soon as I plug in a device with a small delay they should just appear in the drop down list to choose from. The iOS in Visual Studio does this, once I plug an iPhone in on the connected Mac it shows up in the iOS drop down rather quickly. I would expect the Android should work just as easily when connected to the same computer as Visual Studio is running on.
I've got this exact issue now. All devices for Android have disappeared. I can't see emulators or physical devices.
Same issue for me. How can we fix that?
Same here. Visual Studio 2013. I wrote to support (once more) - no reaction last time.
I will post them a link to this thread.
I had the same problem after updating to Xamarin.Android 4.10. However I was able to fix this by updating to the latest Google USB Driver revision (8) in the SDK Manager and changing the USB computer connection from Media Device (MTP) to Camera (PTP).
I'm using VS 2012 Premium and a Google Nexus 7 tab running Android 4.4
Make sure your project is set as the "Startup Project"
@Quasi_Stomach, @RonMacedo I wrote a blog post about issues with VS, the Android Emulator and devices. Maybe it helps other to resolve things: http://krumelur.me/2014/01/30/xamarins-visual-studio-plugin-missing-android-devices-genymotion-and-parallels-desktop-dont-panic/
test
My android device wont appear automatically in Visual Studio. My routine consists of:
Make sure the google usb driver is installed using the Android SDK Manager, Install it if its missing
Plug in your device, make sure its switched on etc
Enable the device for development > device > Settings > Developer Options > tick USB debugging
Make sure your device appears in the Windows Device Manager under portable devices
Start Windows Visual Studio
Open the project
Set the Android project as the start up project
The device should appear or select it Visual Studio > Menu > Target Android Device
Hope that helps, im using a Samsung Galaxy III
Same problem here. Been developing all morning, my samsung galaxy s5 was happy debugging. Went to shop. Came back. Plug device in. Device doesn't show up. Restart xamarin. No luck. Turn USB debugging on phone on and off. No luck.
This is completely random. Someone at Xamarin please pay attention.
"Make sure your project is set as the "Startup Project"" This solved my issue.. Thanks Chase!!
Ah, thanks Krumelur - I also missed installing the USB device driver in device manager. +1 also for the screen shot how it is supposed to look like in VS.
even i had the same issue, i think setting startup project does the trick ,+1 for the suggestion
Making your project is set as the "Startup Project" did the trick, just right click on the project and select "Set as start up project"
Many people are mentioning that your project needs to be set as the startup project. This is true, but more specifically, as @Egalitarias mentioned above, to deploy your project onto an Android device you need to set your Android (.Droid) project as the startup project.
This can be especially confusing if you're working in a Xamarin.Forms project as it the Portable project is the one that is set as the startup project by default.
My device driver, SAMSUNG-SM-G925A, has issues.
The device keeps dropping in and out of Windows Explorer.
As a result, when ever I try to deploy the app to my device, I get half way there just for the device driver to no longer be recognized which terminates the deployment process.
Then, whenever I attempt to update the device driver via Device Manager, the response I get is that there are no further updates required.
"Startup Project" fixed it for me as well. Thanks Chase!
If you encounter this with a Samsung device, you may need to download the Samsung USB driver as well as the Google USB Driver. Google USB driver is available in the android package manager, the samsung driver you may have to google for, at time of this post, i found the one i needed for my Samsung Galaxy S6 here: http://developer.samsung.com/technical-doc/view.do?v=T000000117
"Right click on the project ->Set As Startup Project" worked in Xamarin Studio. A list of virtual devices appeared. Thanks!
I have moved my development environment to a new computer and encountered this issue as well. I've installed everything but still no device.
USB debugging on the phone was enabled but the trick was to disable and re-enable it which generates a new permission for the new computer.
Any solution to this problem ?
Need to restart visual studio a couple of times to solve this issue
Thanks @JJWilliams, that did the trick. After enabling debug on my Samsung (Note 3), and installing the google usb driver, it still needed the Kies file from Samsung installed. Found it here: http://www.samsung.com/us/support/owners/app/kies
Hi All,
Thanks for your solution.It works like charm!
Hi All,
We have implemented app lifecycle, when the app goes to background and gets destroyed or killed by the user, then we start the app it does not show the logout icon in the toolbar for the first time
That worked for me!
Thanks.
Oh, dear, I have tried everything above and my device will not appear. I have reinstalled the Google USB driver, installed the USB driver for my specific phone (LG Spirit 4G LTE), and the phone appears in Device Manager under Portable Devices and has no exclamation mark. I have also enabled Developer Options on the phone and enabled USB debugging.
I have tried changing the startup project then changing it back to the Android project, but still the phone does not appear as a debug device.
The only thing I could not do from the blog by @Krumelur was manually install the Google USB driver, because things seem to be completely different on Windows 10. There is no C:/Users/XXXX/AppData/Local/Android/android-sdk/extras/google/usb_driver folder.
Does anyone have any ideas what I can try next?
Kind wishes ~ Patrick
Revoking USB permissions then re-enabling them on the phone finally kicked the whole thing into life. So the complete answer seems to be roughly to follow the things in the post by @Krumelur and then revoke and re-enable USB permissions on the phone.
I had this issue with Samsung J4-Android 6 and solved it:
1- setting => about phone => click on build number many times until Developer option is enabled
2- setting => develop options => usb debugging is on
For VS 2015, LG Nexus 4 and Windows 7, following solution works for me.
"Debugging On and Off during the running instance of Visual Studio, your physical device appears in the device list."
Solved for me.
In Visual Studio 2015 Community
Tools > Android > Android SDK Manager > Install / Update Packages
This was after a recent Xamarin update. I did not have to change any checkboxes.
I also disabled and re-enabled USB debugging on my Galaxy S7 Edge. Not sure if this contributed.
Just follow this steps.
https://developer.xamarin.com/guides/android/getting_started/installation/set_up_device_for_development/
If setting the startup project doesnot work restart your visual studio. i have faced the same isssue and fixed..
I hadn't noticved there was a popup on my phone (Nexus5x) saying "allow USB debugging on this device". I agreed and it appeared in Visual Studio.
Restarting the adb server will sometimes do the trick .
tools>Android>Restart ADB Server
You will probably also need to click the dialog on the phone to give adb permission to connect ...
I have a Samsung Android phone. Installing the Samsung phone driver, SAMSUNG_USB_Driver_for_Mobile_Phones.exe from the Samsung site did the trick.
@AnthonyX solution worked for me.
Lets summarize the above. Try these possible solutions in this order. This should help 99% of us having this issue.
If none of these solutions work for you, I recommend you reinstall Xamarin.
If using Samsung phone, you might need to download and install http://www.samsung.com/us/support/owners/app/kies on your host (PC or MAC) computer.
First of all make sure that you have installed google USB Driver in Extras at Android SDK manager
Then just follow this steps. It will work in Windows 7 8 & 10
http://visualgdb.com/KB/usbdebug-manual/
Build succeeded.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2292,2): warning : No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2047-05-05) or after any future revocation date.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(487,2): error : ApplicationName='/Users/shaf/Library/Developer/Xamarin/android-sdk-macosx/build-tools/25.0.3/zipalign', CommandLine='4 "/var/folders/6m/vc6d8d454030jx_kr_f6zldw0000gp/T/gihqprtn.cvx/unaligned.jar" "/var/folders/6m/vc6d8d454030jx_kr_f6zldw0000gp/T/gihqprtn.cvx/Mono.Android.Platform.ApiLevel_25.apk"', CurrentDirectory='', Native error= Access denied
1 Warning(s)
1 Error(s)
Time Elapsed 00:00:55.48
zipalign
Does anyone have any ideas why it's coming?
@Niral
My Mobile is not shown as Debugger in visual studio 2015 on windows 10 but for my friend system is shows as Debugger.
Even though I done following steps
On Android device: Setting => About Phone => click on build number many times until Developer option is enabled; then Setting => Develop Options => USB debugging is checked.
I go through the site what you mention earlier in the forum i.e.
http://visualgdb.com/KB/usbdebug-manual/
How to figure it out this problem please help if also any one knows