Debug Application with MonoDroid Trial Version - c#

I have installad MonoDroid Trial Version.
I have create an "Hello Wolrld" application and debug it in the emulator
but any application appears in the list of application on Android Device Emulator!
The problem is the trial version or some error in my application?
Can you help me please???

The Android emulator is somewhat tricky, at least with MonoDroid. Once you execute the application and have selected the virtual device you defined for Monodroid the emulator will launch. Here comes the tricky part, you'll also get a Monodroid "Select Device" window underneath with some slight differences to what you initially had. You should go to that windows and now choose, for example, "emulator-5554" in the running devices list and press "OK". Once you have done that the application should be deployed to the emulator. Slow but it should be deployed.
For increasing Android emulator performance I recommend you to have a look at Emulator snapshots and this article at MoreWally.com.

The bug is described in the following document:
http://support.xamarin.com/customer/portal/articles/141157-ide-does-not-display-target-device
The procedure I use when starting up is:
Close development environment, SDK manager and emulated devices.
Open AVD Manager and start the emulator(s) you would like to use.
Run the command 'adb devices' (located in Android\android-sdk\platform-tools) and note which devices are listed.
If there are none, or the list is incomplete, then run 'adb kill-server' followed by 'adb start-server'. You may wish to create a batch file with these commands.
Now check the devices are visible with the command 'adb devices'.
Open development environment and everything should work.
If you kill or start a new emulated device, when you have VS2010 open, and then devices do not appear as a 'running device' in VS2010, then close VS2010 and perform steps 4 through 6. When you reopen it should now work.

Related

Android emulator in Xamarin Visual Studio does not show the app

I made a new Xamarin Project in Visual Studio , I chose the Single View App .
Then I did not make any changes.
I just pressed the Run Button.
The emulator started ,
but the app was not appeared in the menu of the phone of the emulator.
Is there anyone who know what cause the problem?
On Windows you have a couple of options to accelerate the Emulator. Read more here: https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?pivots=windows
Using HyperV: Make sure to install the Windows Hypervisor Platform:
Right click on the Windows button and select ‘Apps and Features’.
Select Programs and Features on the right under related settings.
Select Turn Windows Features on or off.
Select Hyper-V and click OK.
You probably need to restart your computer after.
Intel HAXM: If you are not using HyperV and don't intend and don't run other hypervisors such as VMWare, VirtualBox etc. then you can install Intel HAXM.
In the Android SDK manager, in tools, download Intel HAXM. After that is done, go to the folder where the Android SDK is installed. There should be an extras folder where there will be an installer for Intel HAXM.
On macOS, Intel HAXM is the way to go. Read how to install it here: https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?pivots=macos
Should be as easy as running sh ~/Library/Developer/Xamarin/android-sdk-macosx/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh from a command-line.
Either of these approaches should significantly speed up the Android Emulator.
If you have issues deloying to the emulator, sometimes the default configurations have very limited space and installing anything may fail due to the emulator running out of storage. Go to the Android AVD and increase the internal storage size.
For other failures, check the Deploy Output window in Visual Studio and provide more information of what is going wrong. Otherwise it is just a guess.
This might be just a bug. Create a new project. If still blank wait 5 minutes. Maybe your computer is slow so it takes time to load.
If you start using xamarin for the first time
Create device from dropout menu (don't just let it create it from pressing run button).
Select device from dropout menu.
Run up.
if it didn't added just restart Visual Studio (should change "Run" into name of the device)

Unity & Unity Remote 5 Android cannot USB test

I started a project on Unity and I would like to test it on an Android device, but I am unable to do so. I researched every tutorial out there and couldn't find a solution that worked for me. Note: I have been using Android Studio and I am able to launch apps both through an emulator and a USB phone.
I am pretty sure I correctly chose all the settings inside of Unity
(followed every single tutorial I could find).
Turned on developer mode on phone and tried multiple setting
variations that I could find on the web.
Made sure all the drivers are installed correctly (wouldn't be able
to do stuff through Android Studio if I haven't).
Uninstalled Unity and Unity Remote 5 multiple times.
JDK and NDK seem to be working fine. Tried turning adb server on and
off multiple times. Also I can see my device with the 'adb devices'
command.
I had some issues with MalwareBytes when installing Unity. I did try
granting permissions to every Unity folder I could find, but I think
MalwareBytes could be the culprit.
Has anyone encountered a similar issue? Is there another thing I could try? Any help is apreciated.
EDIT: I switched my VPN to a VPN that allows open source software and I also uninstalled Malwarebytes and replaced it with Avira. Did not fix the issue.
I did not run in exact same issue, but working with Unity remote might be a little tricky.
It may require to launch Unity remote first before launching Unity itself. And I hope did not forget to ProjectSettings -> Editor -> Any Android Device option to be set. I'm talking about Window OS.
I had the same issue today. I also did everything was mentioned in tutorials and nothing helped.
Then I noticed that when I press 'Play' there's a message in the console "Set-up Android SDK path to make Android remote work in Unity". After I went to 'Edit'->'Preferencies' I unchecked the 'Android SDK Tools Installed with Unity(recommended)', then closed Unity, opened it again and checked the box again.
It worked for me, I hope it will help you too :)
When you connect your phone to your PC, you may chose the file transfer option in your Android device, but charge mode worked for me, this is what I did:
1-Make sure that the "Any Android Device" option in Project Settings/Editor, is enabled and close unity.
2-Open the Unity remote app in the phone and connect it to the PC, in charge only mode.
3-Open Unity and run the game
This method worked for me, I hope it works for you too.

VS2017 Deploy to ARM

I can usually find resolutions to my problems here, but no one seems to have experienced the problem I'm having.
I'm using VS2017, building a UWP app for Win10 Anniversary edition. The app deploys fine to the Local Machine and the emulator. However, when I try to start debugging on the phone (MS Lumia 950), the Deploy process finishes successfully almost instantly. Then I get the "Project needs to be deployed before it can be started..." message. I'm not seeing any error messages during deployment, just the one after deployment apparently succeeds. If I try to deploy from the Build menu, I get the same rapid deployment.
The phone and PC both are updated with the Creators update. I have rebooted the pc and the phone. I have checked the 'Deploy' option in Config Manager. The phone is unlocked when I deploy. If I unplug the USB cable, I get the expected "Bootstrapping failed. Device cannot be found." message. I don't have another USB-C cable to try, but I can see and explore the phone from File Explorer in Win10. I used "WinAppDeployCmd List -ip 127.0.0.1" to make sure the app really isn't on the phone.
I've developed some other UWP apps in VS2015, this is my first go with 2017. Sorry if I was overly verbose, I want to provide as much detail as I can. I don't know what to try next.
Thanks for any insight.
Don

VS 2015 intern Android Emulator not starting (vmWare 10)

I am running VS2015 CTP6 on a freshly installed and updated Windows 8.1 N x64 VM.
Hyper-V support is enabled, hypervisor.cpuid.v0 = "FALSE"and vhv.enable = "TRUE" are set to vmx-file.
When i try to run the build with a Visual Studio Emulator for Android-device VS will tell me "starting emulator" forever. No error, no window, nothing at all.
The included AVDs (like AVD_GalaxyNexus_ToolsForApacheCordova) start fine, just the new Microsoft VS Emulator for Android isn't working.
After canceling the building-process a message pops up: "Could not start emulated device 'VS Emulator....'" which will now always pop up instantly (after building) if i hit F5. So after canceling the build once VS won't even try to start the emulator again (on that project with that specific emulation-device).
In hyper-v-manager there are no computers at all. \Microsoft Visual Studio Emulator for Android\1.0\ does not contain a XDE.exe but 2 vsemu.vhd's.
I also followed this guide and tried to start the emulator as a standalone.
"pathto\XDE.exe" -vhd "pathto\vsemu.api19.vhd" which will actually start it up and displays "loading" on the emu screen but will crash because i haven't installed the Windows Phone support in VS.
The Visual Studio Emulator for Android can't be run nested inside another VM, particularly not a Hyper-V VM, because the emulator itself is a Hyper-V VM (and Hyper-V doesn't support nested VMs). See the last bullet in "Current limitations" at the end of this blog post.
My emulators disappeared (according to VS) after CTP6 update although all the images, SDKs etc. are still there.
I sorted it with a repair (control panel, programs, vs => modify.) It took many hours do just let it run.
Double check that the VM you are running on has enough memory(emulator will use a lot- and run Procmon to see what VS does and where it fails. Check event log and turn on logging for the VS instance you are using to look for cues.
"The Visual Studio Emulator for Android can't be run nested inside another VM"- is incorrect. My Windows10 VM is happily serving up the emulator for the different platforms and the same goes for Windows 8.1 & 8.
HyperV doesn't seem to be able to support quite yet (AFAIK) but there are other hypervisors you can use such as VMWare player- and from your config edits in the VM I assume you already knew that :)
I'll provide picture proof later (phone only right now so I'll have to edit typos as well later).
Tweaking Virtual Maschine Settings did the trick for me. I was also trying to run the Android emulator by starting a debug session in VS2015 Community for a Xamarin project. VS2015 was running inside a Windows10 VM based on VMware Workstation 12 Pro hosted by Windows7 on a i7 CPU. I ran into the following error message:
"... The Virtual Machine Management Service failed to start the virtual machine 'VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.andreas' because one of the Hyper-V components is not running (Virtual machine ID ...)."
Everything worked fine after activating the following flags in the virtual machine's processor settings section:
Virtualize Intel VT-x/EPT or AMD-V/RVI
Virtualize CPU performance counters
(Preferred mode: Automatic)

How do I debug on a real Android device using Xamarin for Visual Studio?

I've found a few links but they don't explain how this is done. I can debug using Xamarin Studio IDE but that IDE (no offense) is lame compared to Visual Studio 2012.
Using Visual Studio 2012, there appears to only be option to select an emulator to debug. So how do I get it to debug on my real device via USB (I already have USB Debugging = true)?
I'm using Visual Studio 2017 with a OnePlus.
In order get debugging working I did the following.
Go to Settings > About phone and tap Build Number repeatedly until developer mode is enabled
Go into Settings > Developer options and turn USB debugging ON
Connect you phone to your PC via USB. I had to plug my phone into my PC's onboard USB port, not my USB hub as this did not work
You should be prompted to trust your PC (trust it)
Fire up Visual Studio
Open your solution and your device should now be available.
Side note: I have noticed that sometimes it also depends on the cable you use. If you still have no luck, perhaps try another cable.
You will get a confirmation prompt on the android device to ask if the PC is allowed to connect. It's easy to miss this if your device's screen has gone to sleep.
I'm using Visual Studio 2015 with Xamarin and the only way I can get it to recognize my Galaxy S4 is to turn USB debugging off and back on again while VS is running. This is required everytime I wish to use this phone with VS. I've never had to do this with Android Studio.
1 - Original drivers (Example: http://androidmtk.com/download-samsung-usb-drivers)
2 - Enable Developer's Options on mobile (for example on android 4.2.2, perform 7 click on "mobile info" - "serial number")
3 - USB debugging on your Mobile Developer's Options too
I also experienced a similar issue,
I solved it by installing the USB drivers specific to my phone model.
tl;dr Install drivers if you haven't already done so.
As mentioned in one of the comments above I installed the device specific USB driver (LG drivers are here) and it solved my problem. It now works perfectly.
I was under the (incorrect!) impression I wouldn't need to install the drivers to enable debugging. I could already connect my device to my laptop to view files etc. and hence thought drivers were unnecessary.
Once everything else is ready, the device could appear under the "Not compatible devices" list. This could be happening if the "Minimun Android version" set in your project is higher than android version you have in your device. If so, you can set the "Minimun Android version" in the android manifest
I set my Mobile connection in USB charging mode and enable USB debugging. It may ask for driver installation, after driver installation disconnect the mobile and reconnect it, now this should show in Visual studio device list for debugging.
It looks like Xamarin Android Player is not installed. You will need to install this.

Categories