Xamarin Live Reload Preview doesen't connect with android emulator - c#

i started recently working on a app for mobile devices with xamarin forms. To work on the GUI fluently i tried this:
Live Reload Preview
It worked with the Visual Studio Android Emulator. But i want to work with google's emulator becaus of the more recent updates. I get in VS the message, that LiveReload is enabled but not listening. So i tried a view things with the "Hostname" and "Port" field within the settings of live reload in VS. If i use the command "adb devices" i can see the emulator and it's port (5554 in my case).
Should Hostname stay at localhost? Or did i miss something? The project worked fine with VS Android Emulator and the Live Reload extension. So i can at least exclude a mistake in my code.
Would be great if there's someone who could help :)
Thanks a lot!!

Related

Xamarin iPhone simulator doesn't show live code changes

When I'm trying to make code changes while using the iPhone simulator it doesn't show the changes .. I tried to reset the iPhone simulator, reconnect to the mac, running the simulator on Xcode and then with Windows Visual Studio. Nothing helped ..
I found out that the new Xamarin packages from GitHub made the problem, so I reinstalled the older packages and now it works :) (https://github.com/xamarin/xamarin-macios/issues/12778)

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.

Unable to deploy Xamarin app on physical iOS device in JetBrains Rider

I decided that I want to work on my Xamarin apps in Rider, IDE from JetBrains. I tried to do that yesterday and the problem was, I can't for some reason deploy my app on physical iOS device (iPad 4). In Visual Studio 19 for Mac it works fine, so my provisioning is fine.
When I try to run app with iOS default config, it offers me various deployment targets, all of which are simulators. But if I go to edit the configuration, I can select connected device and then select my iPad. Though, when I go to run the app again, I am once more greeted with list of simulators.
Please, help me figure out what the issue is, brief googling did not help.
I fixed it by switching from Debug configuration to Debug|Iphone configuration, then it showed my ipad as deployment target. Hope it helps someone

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

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