Xamarin Android Resource Designer Missing ID

We are doing collaborative UI work for all apps as well as individual controls, so the structure we find ourselves in is on (Android):

Android App

    View (Activity + Layout) pulled in from a NuGet package

        Control (Layout) pulled in from another NuGet package

      

Thus, the application pulls in the view, and the view pulls in the control.

The problem is that the resource IDs defined in the layout of the controls are not included in the Resource.designer.cs of the application, so when starting the application, we see a failure when calling FindViewByID.

Interestingly, we have implemented the above in three different applications, it works in two and not the other, so I left thinking that this is ever a difference in the build configuration somewhere or its pure chance and we cannot rely on this template.

Has anyone seen this before?

Update:

By paying closer attention to the assembly output, I can see the warnings generated for the missing controls:

Warning XA0106: Skipping MyControl.Resource.Id.myId. Please check that 
your Nuget Package versions are compatible. (XA0106)

      

+3


source to share


1 answer


Old question I know, but in case someone needs it:

After upgrading to Xamarin.Forms v4.1.0.581479, I ran into very similar problems and followed the above comment by James Ashe and JimmyGarrido's answer to get permission: https://forums.xamarin.com/discussion/89661/a- lot -From-warning-appear-in-new-empty-Xamarin-forms-XAML-project



The simple answer in my case was to remove the PCLAppConfig Nuget package. There may be other packages in your project that were built using an older version of Xamarin.Android.Support * packages. Unfortunately I didn't find a way to diagnose which package was specifically causing the problem, so updating, then uninstalling and retesting one at a time led me to a solution.

0


source







All Articles