Running an OpenGLES app on mac iphone emulator fails - android

I set up the vcremote correctly(https://msdn.microsoft.com/en-us/library/mt147405.aspx#ConfigureVS) and it connected. I tried to run the default visual studio OpenGLES app on the iphone emulator through vcremote and it built the app just fine, but just as the emulator opened it crashed with the following error:
"Unable to start debugging. Unexpected LLDB output from command "-target-select remote localhost:3031". Command 'target-select'. Fn 'Target select' failed"
I have no idea how to fix this, and it seems that there are not a lot of people running into this problem. Any help would be much appreciated, even if it just helps me understand the error message better, SOMETHING!

I had been struggling with this problem for hours and hours until I found the following link:Remote Debugger Port Assignments
The Visual Studio Remote Debugger can run as an application or as a
background service. When it runs as an application, it uses a port
that is assigned by default as follows: Visual Studio 2022:
4026 Visual Studio 2019:
4024 Visual Studio 2017:
4022 Visual Studio 2015: 4020 Visual Studio 2013: 4018
Visual Studio 2012: 4016
The port 3031 seems to be coming from out of the blue!
I am using Visual Studio 2017 so I used the following command to start up vcremote:vcremote --secure false --nativeDebugProxyPort 4022
After that the iPhone simulator and App started up, but the debugging started to work only after restarting the App during the debug session (which I did by rebooting the iPhone simulator).
I still did not get the pairing working on a secure connection yet :-( Any hints are welcome!

Related

Xamarin stuck at “Found device: emulator-5554”

Xamarin stuck at “Found device: emulator-5554”
I am currently learning Xamarin for Android app development. I installed the xamarin workload for visual studio a few days ago. Today I built a hello world app with Xamarin, tried to run it with an emulator. When I ran the app, everthing went fine until the device loaded succesfully, when the putput window in visual studio said Found device: emulator-5554.
At that point visual studio and the emulator ‘stopped’, not hanged, stopped. The status bar said Ready and the build animation that appears when building a project showed that the process was half completed. I waited for several minutes, but nothing changed. I tried to ‘preload’ the emulator like adviced on other stackoverflow questions, which again didn’t work.
UPDATE: Now Visual Studio is stuck at Waiting for emulator to be ready... which takes forever and never loads.
I work on Windows 10, Visual Studio 2019 Community with the Xamarin workload, along with the default Galaxy Nexus API 23 Android Emulator.
Thank You! Any help is appreciated.
This is a common problem in Visual Studio when you use Android Emulator.
You can try 2 ways for resolve this problem.
First way
1: Go in "Tools", then Android then Android Device Manager.
2: Run simulator
3: Then Start your project
Second way
1: Go in "Tools", then Android then Android Device Manager.
2: Delete all yours Android Simulators
3: Create a new Simulator
4: Run simulator
5: Then start your project
Let me know if works :)

Unable to attach debugger in Android Studio in MacBook

I am unable to attach debugger in Android Studio in MacBook. I am getting this error
Failed to start monitoring <deviceID>
I have tried multiple solutions :
Turn on/off usb debugging on device
Invalidate cache/restart Android Studio & Build -> Clean project
Stop and start adb server from terminal
Changing cable/usb port
Reboot Android device, Mac
Reset Android device
Upgrade gradle plugin & Android Studio to new version
Setup:
Macbook,
Android Studio 4.2,
Pixel 3a Android 11
OnDevice USB Preferences:
USB Controlled by: This Device
Use USB For: No Data transfer
I was able to work with the debugger fine for a very long time (~8 months) but it stopped abruptly few days ago and did not have any luck since then.
I have tried various solutions from stackoverflow, medium most of them fall under the things I have tried above and I have observed that the solutions are for Windows machines, so wondering if there is anything different for Android Studio on Macbook?
Appreciate your time looking into this. Thanks in advance.

Xamarin.Forms Visual Studio 2017 project does not deploy

I am new to Xamarin. I used Xamarin. Forms template to create a sample mobile solution in Visual Studio 2017. The process created four projects Xamarin PCL, Xamarin Android, Xamarin.iOS and Xamarin.UWP. Without making any modification to the generated solution, I am trying to run it.
The first issue is, when I set the UWP as the starting project, the Windows emulator shows up and runs the app perfectly. But when I try to do the same with Android, I get different errors at different times based on the environment changes I make. Finally, using the visual studio android emulator, the Phone UI shows up but not my app. In the background, I can see that Visual Studio completed the build process successfully without any errors but the deploy process simply hangs. I left the deploy running overnight but still running in the morning. Here is my environment.
Intel Core i7 processor
Virtualization enabled in BIOS
Windows 10 Education
32GB RAM
Hyper-V disabled in Windows
Executed bcdedit /set hypervisorlaunchtype off in the command window and rebooted.
I tried setting the above environment in different combinations but none of them seem to make the app work. When I use an android emulator from android SDK, the build process throws errors. The only emulator that even builds is the visual studio emulator. But the deploy hangs.
A second issue I have is, I have installed android SDK for version 24 and 25. But in the emulator dropdown, I can only see the emulators for 23. I checked the installation path both in visual studio and android SDK manager and they both point to the same installation folder. What do I need to make the emulators for version 24 and 25 usable?
I repeat, I did not make any change to the generated solution in visual studio before running it. I have been at it for the past three days and couldn't make it work. Please help.
I just installed Visual Studio 2017 (on Win10 15063.138) and found, like you, Xamarin projects won't deploy to Android. Here's how I got running:
Updated everything in the Android SDK Manager.
Installed the new, improved Android Emulator from MS:
https://www.visualstudio.com/vs/msft-android-emulator/
Used that to download/install an API level 23 (6.0 Marshmallow)
emulator
Started that emulator using the same tool (you'll see it running in Hyper-V Manager)
Selected same emulator in VS for deploy/debug (the emulators that ship with VS are painfully slow)
In VS, selected Android project for start-up and verified build and deploy to Android in build config mgr.
Note: MS doesn't appear to have any emulators above API level 23, so Compilation and Target settings for your Android project can be the latest, but the minimum target will have to be 6.0 (API 23).
After pulling my hair for the past few days, I finally got my Xamarin.Forms Android App to show my page on the emulator. Thanks to all the members for their suggestions. Ryan's suggestion helped a lot ( I +1ed him, thanks Ryan) but did not solve my problem. I googled further and found a suggestion that asked to change the following setting which did it for me finally. So, if anyone else get stuck like I did, please do the following (in addition to cleaning up and updating all packages):
Open up the setting for your Hyper-V vm for your emulator (while the VM is off).
Expand the Processor node on the left and click on "Compatibility".
Now put a check mark on "Migrate to a physical computer with a different processor version" on the right.
Start your emulator in the Visual Studio Emulator tool.
Now, start debug your android project in VS using the same emulator that is already running.
After a delay (there is always a delay), your app will show up on the emulator. Yey!!

Visual Studio Android Emulator stuck when creating virtual machine

Ok so my Visual Studio Android emulators stopped working this morning. First I was was receiving a networking error and so I tried to delete and re-create them, but the creation keeps getting stuck on "Copy .vhd files and creating virtual machine". The last time I tried it I let it sit on that step for over half an hour, and that was after trying first this Visual studio (2015) emulator for android not working - XDE.exe - Exit Code 3 then this Visual studio android emulator will not start fully
Oh and I completely uninstalled and re-installed Visual Studio Emulator for Android.
Any thoughts would be greatly appreciated.
I finally got a VM to download and execute after reinstalling Hyper-V (un-check Hyper-V from Windows Features, reboot, re-check it, reboot). I've gone through many of the referenced cleanup steps many times prior to trying that, though I did perform a repair of the Visual Studio Emulator for Android and deleted all of the device profiles just before reinstalling Hyper-V.

Visual Studio Emulator for Android - Project does not Deploy

Windows 8.1
Visual Studio 2015 RC
Android Application API Level 21 (Xamarin.Android v5.0 Support)
I recently had to rebuild a new PC as my old one had major problems. On this new PC, the project compiles and the emulator launches. However, during the emulator OS load screen I receive a message stating:
"This pre-release version of the Visual Studio Emulator for Android will expire in 3 day(s), 13 hour(s). Please upgrade to a newer version."
After I click "OK" the emulator OS finishes loading and I receive the message "2>Emulator launched successfully." in the Visual Studio Output window.
On my previous PC I did not receive the pop during the emulator's load and after the emulator finished loading it would then deploy the application to the emulator and begin debugging. However, after the emulator finishes loading on my new PC, no further output is displayed in Visual Studio and the green load bar in the bottom right corner of Visual Studio sits at about 30%.
I have been unable to find any information online related to the popup message I receive during the emulators load screen. I cannot find any update for the emulator or Visual Studio. I have uninstalled and re-installed Android Studio, Xamarin Studio, and Visual Studio twice with no change.
How do I update to the latest version?
Why would Visual Studio not deploy the project when the debugger begins?
I had the some problem, and I was able to fix it by manually running adb connect emulatorhost:5555 from the command line.
I found that I had to launch Visual Studio with elevated permissions. I changed the properties for the shortcut and checked the field "Run as Administrator" and all is well again.
Have the same Problem, elevated permissions not works. Run adb from commandline is alreay connected.
The new update from Xamiran (version 4.0.4.4), fix this problem for me. :)

Categories

Resources