Various warnings when compiling Xamarin Forms solution from Android project.

Thierry.8340Thierry.8340 USMember ✭✭

Hi,

I'm getting various warning when compiling my Xamarin Forms solution but they all seem to be coming from the Android project and I've got no idea on how to resolve them. All together I've got 10 warnings but here are a few of the warnings which will hopefully help:

========================
Drawable.avd_hide_password_x warnings

Warning Skipping MyApp.Mobile.Droid.Resource.Drawable.avd_hide_password_1. Please check that your Nuget Package versions are compatible. MyApp.Mobile.Android

Warning Skipping MyApp.Mobile.Droid.Resource.Drawable.avd_hide_password_3. Please check that your Nuget Package versions are compatible. MyApp.Mobile.Android

Other warnings

Warning Skipping MyApp.Mobile.Droid.Resource.Id.design_menu_item_action_area. Please check that your Nuget Package versions are compatible. MyApp.Mobile.Android

Warning Skipping MyApp.Mobile.Droid.Resource.Id.fixed. Please check that your Nuget Package versions are compatible. MyApp.Mobile.Android

========================

I've googled it and found a couple of suggestion.

  1. Xamarin.Forms library may be out of date: I checked and it was. I've updated it since and it is now the very latest version but to no avail.

  2. Set the version of the Android project to 8. I created a new virtual device yesterday and when I did I had set it to Oreo 8.1 - API 27. When I checked the version, it was actually set to Pie 9.0 - I changed it to 8.1 but again, no luck

  3. Check Nuget packages packages are compatible. I've checked all the ones from the Android project and they are all from MonoAndroid 6 or higher all the way to 8.1 which I assume should be ok.

Any ideas on how I can remove these??

Thanks.

Thierry

Answers

  • jezhjezh Member, Xamarin Team Xamurai

    You can try to add the following code to your .csproj

      <AndroidUseManagedDesignTimeResourceGenerator>False</AndroidUseManagedDesignTimeResourceGenerator>
    
  • Thierry.8340Thierry.8340 USMember ✭✭
    @jezh I will try it later and get back to you but would you mind explaining why I have to add this.? What's wrong in using managed design time resources? Why allow it if it's going to generate warnings? I have no idea what managed design time resource are. Can you enlight? I will Google the lot later as well if you know, it would be great if you could spare a few mins to explain. Many thanks.
  • Thierry.8340Thierry.8340 USMember ✭✭

    @jezh That removed some of the warnings but all the ones regarding the password remain:

    MyApp.Mobile.Droid.Resource.Drawable.avd_hide_password_3. Please check that your Nuget Package versions are compatible. MyApp.Mobile.Android

    Any ideas?

    I'll keep researching it and post my finding but in the meantime, I found a very good link when I searched for the parameter you mentioned in your reply.

    https://forums.xamarin.com/discussion/126780/every-resource-id-is-ambiguous-notfoundexception-resource-id-0x0

    Thanks.

Sign In or Register to comment.