Slath
Slath

Reputation: 167

Xamarin sample application not displaying anything

I meant to try out Xamarin.Android for a project of mine, so I installed Visual Studio 2015 and Xamarin.Android. I then installed the packages for the versions of Android I meant to use.

Now, I am trying to fire up TaskyAndroid, following this tutorial. At first, one of the two projects was skipped, which I fixed by babbling around the net. Now, if I start it in Debug, it launches the emulator and gives me this error:

Couldn't connect to logcat, GetProcessId returned: 0

I checked in the project properties, both projects of the solution are configured for Debug. I have Fast Deployment disabled and I allowed INTERNET and ACCESS_COARSE_LOCATION in the Android Manifest. The emulator displays a blank screen.

If I start it in Release mode (after changing the configuration), the emulator displays the same thing, without the aforementionned error.

EDIT: I have tried cleaning and rebuilding the solution. Deselecting "Use Shared Runtime" and reinstalling Xamarin didn't help either. I have tried hahing a look at the log, but I failed to muster any relevant information from it.

Upvotes: 3

Views: 3760

Answers (2)

Alex Zel
Alex Zel

Reputation: 113

While I was dealing with the similar issue (just with the real device instead), I found that my Mono Shared Runtime, installed on my android device, was corrupted or something like that.

Was drilling the web for ages without any positive results about the exact solution that I actually found.

Go to your phone Setiings -> Apps -> Mono Shared Runtime -> Uninstall

With your next build and deploy, it will be reinstalled again and, hopefully, it will solve your problem as it did for me.

Edited: After a while, I found some more reasons which could silently prevent to deploy your app on device:

  • lack of space in your SD card
  • corrupted installations of your app with names like: yourProjName.yourProjName 0kb size

Upvotes: 3

Luis Beltran
Luis Beltran

Reputation: 1704

There are several solutions in this thread. Please try:

  • Closing Emulator, Cleaning solution then Running solution worked for me. Or
  • Clean and Rebuild Or
  • Deselecting 'Use Shared Runtime' in Project Properties > Android Options > Packaging properties Or
  • Re-installing Xamarin emulator

Upvotes: 5

Related Questions