Forum Xamarin.Android

Xamarin.Forms Android project lost all references in VS2019

ludas96ludas96 Member ✭✭
edited May 2020 in Xamarin.Android

As I've got no clue what happened today, I'll try explain as much as possible.

Today when i opened my Xamarin.Forms project, my Android project decided to lose all of its references, and when I try to open the emulator I get the error message:

    PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT

    Emulator tablet_m-dpi_10_1in_pie_9_0_-_api_28 cannot be started.

I've had this project going for over 6 months without anything like this. I did not update anything before shutting my PC off yesterday, and I've tried to update everything I could.. such as using Pre-release build 4.7.0 for Xamarin.Forms etc. Nothing helps, and im 99% sure this hasn't really got anything to do with Xamarin itself, but rather something with Android SDK, but I'll give this forum a go aswell. Maybe someone's had this problem before.

Not quite sure what's going on. I've tried deleting and recreating my Android Emulator, changed SDK versions, etc etc. And nothing helps.

I can't access Xamarin.Forms in my Android project, nor any of the included dependencies through my PCL, it's just red everywhere.

OnCreate()-method in MainActivity.cs (how it looks in the entire Android-project)

My iOS project works just fine, and so does my PCL. So it's obviously something with Android - I just don't know what, or how it could become like this from shutting down the PC last night.

I've also tried to create a fresh Xamarin.Forms project and even then my .Droid-project just wont work. I've reinstalled VisualStudio 2019 with both 16.5 and 16.6 versions and nothing works.

AVD path: C:\Users\LudvigÅslund\.android\avd

SDK path: C:\Program Files (x86)\Android\android-sdk

PCL Dependencies

.Droid Depencencies/references

(copied from my StackOverflow post from earlier today)

Best Answer

  • ludas96ludas96 Member ✭✭
    Accepted Answer

    Yes it was solved by changing the username of my windows account, basically it stopped working with my non-ascii letters (Å in my case).


Sign In or Register to comment.