Emulators list is empty - visual-studio-cordova

With Visual Studio 2017, I've been building and testing an Android app for a while. Now, all of a sudden, the list of emulators is empty:
How do get the list back again?

Fixed now.
It turns out that when VS was switched to "Release" mode, the list of emulators returned. But, switching back to "Debug" lost the list again.
In "Release" mode, I switched to a different emulator/simulator. After doing that and switching back to "Debug", everything was fine again in both modes!

Related

xamarin.forms Android release build only works with fast deployment enabled

For the past days I had major issues with deploying the android version of my app. I found out that I am only ever able to get the app to work when "Fast Deployment" is checked. However, this means I can never archieve my app. If fast deploy is enabled, the app, even though it is in release mode, is treated like a DEBUG build and therefore not accepted in the playstore.
If i uncheck fast deploy for release builds the app starts and then idles, not doing the first rest call it is supposed to do. If I leave the rest calls out, the app again works.
How can this be correlated?
The symptom that it works when set "Fast Deployment" suggests this situation:
If you are testing a release build on a device that previously had a debug build, its possible that the debug version did not get fully uninstalled. Specifically, "Fast Deployment" stores the xamarin library as a separate DLL. Because your release build has the same "bundle id" as the debug build, Android can get confused.
To fix.
Best Fix for emulator:
Tools / Android Device Manager / Select virtual device / Edit / Clear to Factory Defaults.
Quickest fix for phone (but not sure if it helps):
Drag app to trash can.
Power down the phone. Power it back on.
Deploy release build to device. Either by installing apk, or by "Start Without Debugging" menu item.
Quick Fix:
Run debug version again on the device. This makes sure Android "knows" that the debug version of app is there.
Stop the app.
On the device, "uninstall" the app. (Drag it to trash can).
Deploy release build to device. Either by installing apk, or by "Start Without Debugging" menu item.
If that doesn't work, then use "adb uninstall":
Run debug version again on the device. This makes sure Android "knows" that the debug version of app is there.
Stop the app.
menu Tools / Android / Android Adb Command Prompt.
adb uninstall com.companyname.appname <-- substitute your app's bundle id
deploy release build to device.
It turnes out that turning ON my linker to link assemblies only actually decreased the app size AND made everything work again. Before, the linker was set to LINK NONE (which should've been the safer bet, but turned out to be an error...).

Visual Studio 2019 & Xamarin iOS - Simulator issues

I've been trying to rework some pages that needed a change.
When I've edited a xaml page and corresponding xaml.cs page when Visual Studio built the page and ran it on the simulator it behaved like I did no change on it.
I've tried cleaning and building and cleaning and rebuilding my solution but to no avail.
There are some issues with running the simulator as well when sometimes it would start the app normally and the next time I start it I need to kill simulator completely and then re-run it
Is there some kind of setting that I've missed to set-up?
When you are making changes to xaml in debugging mode, you must hit save button to tell VS to push changes to emulator. The screenshot you provided clearly says that you didn't hit save. Also you must to enable hot reload for Xamarin. VS Options -> Xamarin -> Hot Reload.

Why do I get this GRPC Error "WARNING: EmulatorService.cpp:448: Cannot find certfile" when I start the emulator?

Good evening everyone, I have only been dealing with Java and Android Studio for a few months, can someone help me to solve this error? It occurs every time the emulator starts. Thank you
Emulator: Started GRPC server at 127.0.0.1:8554
Emulator: emulator: WARNING: EmulatorService.cpp:448: Cannot find certfile: C:\Users\Sawye.android\emulator-grpc.cer security will be disabled.
Invalidate and Restart option in Android Studio, followed by gradle clean, and manually uninstalling the application from the emulator finally worked for me. Individually, they didn't for whatever reason.
I tried several other options mentioned without any luck. The file it mentioned "emulator-grpc.cer" still doesnt exist anywhere. There is a keystore in that folder called debug.keystore which isn't altered after fixing it, so I'm guessing that error is just misleading about the real problem, whatever it is. Anyway, thought I'd share what worked for me since I searched everywhere for it and didn't find it.
A quick fix:
From the main navbar menu
Tools > Android > SDK Manager > Android SDK > SDK Tools
You'll then see the screen below where you can select '- Android Emulator Hypervisor Driver for AMD Processors (installer) version 1.3.0'
I am not sure what the actual root cause of the issue is, but this patched the issue for me and may help other people.
Here my scenario: I closed the emulator with force quit. After restarting emulator, I always got this error.
Fix: I opened the AVD Manager in Android Studio by selecting Tools > AVD Manager menu. In the opened popup, I chose Wipe Data option as can be seen below image. After that, I restarted emulator and it worked !!!
Your emulator is out of date, please update by launching Android Studio:
Start Android Studio
Select menu "Tools > Android > SDK Manager"
Click "SDK Tools" tab
Check "Android Emulator" checkbox
Click "OK"
Got the same issue, I restarted the computer and then runned again the emulator and it worked. Important! you have to run the app, not debug it. You can use debug after the app is installed again in the emulator
Unless it's preventing your app from running in the emulator, or preventing the emulator from running at all, I wouldn't worry about it. It's something new that Google put into the emulator so it now checks for that file. I looked at an installation which did not have the updates and the cert file was missing there as well, and it ran just fine with no error. I'm not sure what Google is doing, but I know that this wasn't thought through all the way based on the number of people who have been having problems with this.
I was also getting the same error. The above answers didn't fix my issue. I tried a lot of things, then finally when I uninstalled Intel x86 Emulator Accelerator (HAXM installer) from-
Tools > Android > SDK Manager > Android SDK > SDK Tools.
Then I reinstalled Intel x86 Emulator Accelerator (HAXM installer). This fixed my issue and I was able to run my emulator again. Hope it helps!
I have tried all the strange answers above nothing solved the issue. So searched in google's issue tracker, I found someone posted an Issue about it, and here is what the team wrote in response:
Hi, this warning is benign. We'll remove it in a future update.
So as google said: that warning is nothing to be worried, not harmful, and will be removed!
Update:
Issue was now indeed fixed with latest Release Update for the Canary Dev Channel:
Removed prints about certs and GRPC on startup.
You need to add credentials for your application in console.developers.google.com i.e. credentials, clik Api Key 1 and than ADD AN ITEM in Restrict usage to your Android apps.

Visual Studio 2017 Launches Two Instances Of IE When Debugging A Single Project

My development machine was recently renamed and updated to Windows 10. While debugging a single ASP.Net project in VS 2017, I press F5 and two instances of the same page show up in my IE-11 Browser (Two Tabs - Same Page) which screws up the debugger. It works fine when I launch under chrome but I need to debug IE for now since it is still the company standard.
Has any seen this behavior and is there a way to fix it?
Thanks for any insight - it's driving me crazy.
After a lot of head scratching, I finally came up with the solution and it was one of those things where it was simple. After the Windows 10 upgrade occurred, the software went and reset all of my IE 11 browser settings. There is an option on the first option page that says "Start with tabs from last session". This was selected and every time a new VS browser window fired up it went and created a tab from my previous session. I selected the other option "Start with home page" and the problem went away.

iOS app not being copied to simulator

An iPad app I'm starting compiles and builds fine, I get a packaged application. But when I try to debug it, it fails with "Unknown error" after trying to install in the simulator. Inspecting the simulator directory, no Application sub-dir for my app is ever created.
It works perfectly for other iPad projects and I'm not really sure where to start - what does this imply is wrong inside my package? Does the simulator inspect the package before installing it?
I should add, this XCode project was a working iOS sample app that previously DID deploy and run on the simulator. I have only changed the source files and linked in some additional libs, not changed the underlying project structure. I don't expect it to run without errors, but I did expect it to at least start up!

Resources