Xamarin 'hello world' app won't run, emulatpr too big - xamarin

Decided to give Xamarin a shot. Installed xamarin, launched Visual Studio, created a new blank android project, ran it, created an account, checked the 'business trial' option.
First time I ran it I got a popup saying could not contact device.
Second time I ran it I got an error saying Could not connect to logcat.
Third time I ran it the emulator appeared and showed me this:
I waited a while but nothing happened.
I tried stopping it and running it again, I got the first error again.
In between these steps, I have made no changes, just stopped and started.
Any idea why it's being so useless? I can't seem to do anything with the emulator because stuff is too big to click. Any advice welcome, it's a bit off putting that this is my first experience with Xamarin!

You really want to try running the latest Xamarin Android Player. You can find the downloads for both Windows and Mac here: https://xamarin.com/android-player
The instructions are pretty precise, should you have any issues during the installation: https://developer.xamarin.com/guides/android/getting_started/installation/android-player/

Related

Xamarin - How to see the iOS Simulator app log

I recently upgraded some Firebase packages in my iOS Xamarin app, and now the thing refuses to work. The app opens (shows a splash screen) and immediately closes without producing an error.
While I want to fix the package problem, I have no clue where to start. I set a breakpoint on the App.xaml.cs constructor, but this never gets hit when I run the iOS version. So my next idea was to read the output like I do on Android.
I've been Googling around for a few hours, and everyone seems to say 'Go to Debug > Open System Log...', but this is absolutely rubbish! The system log seems to show everything except for my app running... (E.g. I run the app in the simulator, reload the system logs, and the freshest thing is from 10 minutes ago...)
I'm at my wits end here. Does anyone know a trick for viewing my app output in the simulator? Even just an exit code would be useful 😥
You could view the logs in these locations:
Mac – ~/Library/Logs/Xamarin/Simulator.Server
Windows – %LOCALAPPDATA%\Xamarin\Logs\Xamarin.Simulator

Could not determine the installation package com.company.appName

I can't launch my app anymore on Android. The iOS counterpart seems to be fine.
The full error is:
ADB0000: Could not determin the installation path for package.com.company.appname.
'adb shell pm path com.company.appname' returned.
It was working. I pulled some changes from the repo, none of which should have affected any app properties. Actually it was initially launching, but I was getting some odd behavior within the app, so I uninstalled the whole thing off of my phone. Now I cannot launch it at all. What I could find about this error was that my AndroidManifest.xml might have a typo, but I couldn't find anything that stuck out. And like I said, there shouldn't have been any changes in there recently. Any help would be greatly appreciated.
Steps I have already taken:
1. Clean and rebuild
2. restart VS
3. delete obj and bin folders
4. search for solution on here and xamarin forums
UPDATE:
I just successfully launched it on another android device. So it seems to be a problem with my Pixel 2 XL. How do I make sure all traces of the app are gone so I can start fresh?
This usually happens when you have more than one user in an Android device (I still cannot figure out why is this).
As mentioned in the comment by using the adb uninstall full.package.name command it will uninstall the app.
But there's another way which does not require command line or nothing related to that.
If you go to the Settings -> Apps and Notifications on the Android device you will be able to uninstall it from there.
Let's use the UnoQuickStart.Droid app as example here. As you can see it's already in the same state as it was yours.
Once in the App details both Uninstall and Force Stop are disabled. But do you see those 3 dots image at the right upper corner? Click on it.
This will bring you a context menu with a single option "Uninstall for all users". You can click on it with confidence.
As expected, a warning message telling you what's gonna happen. Just click "Ok".
As you can see the App is not longer installed and you will now be able to install it again.
Hope this helps.-
As per apineda's instructions, using adb unistall com.company.appname fixed the problem. I was able to get to the ADB location by navigating through Visual Studio -> Tools -> Android -> Android ADB Command Prompt.
Before I did that, I looked at the App list for my phone, which listed the app, but apparently not installed for this user. The Uninstall and Force Stop buttons were disabled and several of the fields just said loading... or something like that.

Apple News Preview - Simulator stopped working

I am currently testing the Apple News JSON format using XCode / News Preview / Simulator and randomly running into a new error that was not occurring prior to today.
I am attempting to load the article.json file into the News Preview app (it's been working up until today). The article.json file gets successfully loaded with no errors in the console but the Simulator is claiming that the channel is not available for me. Here is what the error message on the Simulator reads:
Channel Unavailable
This channel isn't currently available in your region.
The News Preview and Simulator were working just fine until today. I have tried re-installing XCode and News Preview (and Simulator because I re-installed XCode) but the problem persists. Other colleagues of mine are now experiencing the same problem.
I tried also clearing all the content in the Simulator and tried wiping the device clean and also tried going to the "Debug" menu in Simulator and setting the Location specifically there, as well, without any success.
Is there a way to fix this or is there a way to know if there was a recent developer push to the Simulator code base?
Just to add a bit more detail, I am attempting to load the official Apple News article preview files, not my own article.json files (I tried loading my own json files, as well).
Any help is appreciated.
Hey I also just had this issue and have been troubleshooting since yesterday. Not sure what is causing it, but it only happens for my on devices simulators from iPhone 7 and newer.
Try running the preview on iPhone 6 or an older-gen iPad, etc... that's working for me.
The solution on only one of my machines was to enter the Publisher ID into the News Preview application, which is the first thing that is asked when launching the News Preview app. After entering the Publisher ID, everything seemed to return to normal - for all of my colleagues and I.
See my comment above about my new macbook and the new problem it is having.

Unfortunately, Launcher3 has stopped

I get this error in Visual Studio, when I run my Xamarin application in built-in simulator.
Unfortunately, Launcher3 has stopped
And I wanted to write the solution that I found
for people who are searching the same problem:
The problem has solved when I wait or re-launched the application.
The reason of this error is this :
The simulator is not opened on the first run, and it gets this error.

Couldn't register "Application" with the bootstrap server [duplicate]

I keep getting this error when launching my app on the iOS Simulator:
Couldn't register com.mycompany.MyApp with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.
I've read other reports of this error and it seems there is no obvious fix for it (restarting the iOS Simulator, restarting Xcode etc..)
At this point here's a list of things I've tried:
Restarting the Simulator
Restarting Xcode
Rebooting my machine
Deleting my app's Derived Data, and Cleaning
Deleting the iOS Simulator App Support directory
Reverting to a 2 weeks old version of the app (which was working 2 weeks ago)
Deleting the application in the Simulator (by clicking-holding on it and hitting the X button)
Upgrading Xcode form 4.1 to 4.2, and running the app both in iOS Simulator 4.3 and 5.0
Nothing worked, I still get the same bootstrap error.. Any (and at this point I really do mean ANY) suggestion would be appreciated.
Edit: Just wanted to add that the app runs fine on a device. I only get this error on the simulator...
As the GDB said:
This generally means that another instance of this process was already running or is hung in the debugger
So find out it and kill it. ;)
I restarted the mac, and it run successfully.
Tip: Well, this may be not work sometimes, so I strongly suggest that you press cmd+. to make sure that you do have stopped the simulator (or device). I find that in most cases the simulator (or device) will not stop exactly when it crashes. I rarely met this issue again with pressing the cmd+. every time it crashes or even just normal exit. Hope this will be helpful. :)
I just closed my xcode & restart my device(ipad2) and it works for me :)
You can try this :: Couldn't register with the bootstrap Server
Another solution, go to clear the memory of the iphone simulator
Simulator > recovery content and setting
then run the program again.
i just change the identifier and the app can work again.
I had to change my bundle identifier finally
No matter you reboot all devices and cleanup all , it gets stuck hard in the debugger..
don't know how to clear it..
As I experienced, device (or simulator) restart does solve the issue,
BUT it would be better not to couse it.
Also my experience is that:
You can find the place of crash by cousing it. In such time developers usually press "STOP the running scheme" this could cause zombie process stuck in device.
BUT
if you press "COUNTINUE program execution", debugger will terminate the process, it will not become a zombie.
I had this error too and I noticed that it works for me if you close the simulator and stop the program and then change your company name.
I don't know why but it works for me.
I opened Activity Monitor and searched for my app name, and found another instance of it listed. I used Activity Monitor to quit that instance, and the problem went away for me.

Resources