Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

android.content.res.Resources$NotFoundException: Unable to find resource ID #0xffffffff #13843

Closed
sisaacks opened this issue Feb 23, 2021 · 113 comments · Fixed by #14101
Closed

Comments

@sisaacks
Copy link

sisaacks commented Feb 23, 2021

NOTES

The issue here appears to be that google removed some resources/apis that we are compiling against. It looks like we will need to start pinning the AndroidX dlls or compile against newer releases of AndroidX at a faster cadence

Original ticket

I updated my project this morning with some new android files via newget and ever since, when I try to navigate using the flyout menu, I get the following error: android.content.res.Resources$NotFoundException: Unable to find resource ID #0xffffffff

Description

The files I updated that caused this issue were:

Xamarin.AndroidX.MediaRouter 1.2.1 -> 1.2.2.1
Xamarin.AndroidX.LeanBack 1.0.0.6 -> 1.0.0.7
Xamarin.AndroidX.Palette 1.0.0.6 -> 1.0.0.7

when I rolled the files back I no longer have the issue

Steps to Reproduce

  1. Update your Xamarin app to the latest android files
  2. Try to use flyout navigation
  3. I know one of the files I updated was Xamarin.AndroidX.Palette

Expected Behavior

Actual Behavior

Basic Information

  • Version with issue:
  • Last known good version:
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP:
  • Android Support Library / AndroidX Version:
  • NuGet Packages:
  • Affected Devices:

Environment

Microsoft Visual Studio Professional 2019 Version 16.8.6
Xamarin Forms 5.0.0.2012

Show/Hide Visual Studio info

Build Logs

Screenshots

Reproduction Link

Workaround

@sisaacks sisaacks added s/unverified New report that has yet to be verified t/bug 🐛 labels Feb 23, 2021
@sisaacks
Copy link
Author

@samhouts please let me know about this, this is holding up development :(
I tested a version on a diff device before I updated and it works fine

@thomasmalloch
Copy link

thomasmalloch commented Feb 24, 2021

I was able to get my android project to run by downgrading Xamarin.Google.Android.Material to v1.2.1.1

@xperseguers
Copy link

It does not help for me, the app still crashes with the exact same error.

@@ -207,7 +207,7 @@
   <PackageReference Include="Xamarin.FFImageLoading"><Version>2.4.11.982</Version></PackageReference>
   <PackageReference Include="Xamarin.FFImageLoading.Forms"><Version>2.4.11.982</Version></PackageReference>
   <PackageReference Include="Xamarin.FFImageLoading.Transformations"><Version>2.4.11.982</Version></PackageReference>
-  <PackageReference Include="Xamarin.Google.Android.Material"><Version>1.3.0.1</Version></PackageReference>
+  <PackageReference Include="Xamarin.Google.Android.Material"><Version>1.2.1.1</Version></PackageReference>^M
   <PackageReference Include="Xamarin.Google.Guava.ListenableFuture"><Version>1.0.0.2</Version></PackageReference>
   <PackageReference Include="ZXing.Net.Mobile"><Version>2.4.1</Version></PackageReference>
   <PackageReference Include="ZXing.Net.Mobile.Forms"><Version>2.4.1</Version></PackageReference>

(and corresponding automatic changes in Resources/Resource.designer.cs).

@tci-ash
Copy link

tci-ash commented Feb 24, 2021

Same here. Other than nuget updates, I had installed the latest update from VS . Also updated the Android tool chain. At this point I am so far down the rabbit hole that I can't go back and even then go back to what?

@sisaacks
Copy link
Author

@samhouts any updates on this? seems like a pretty big issue

@xperseguers
Copy link

xperseguers commented Feb 24, 2021

After going back a few (library-related) upgrades, it looks like the bug is gone for me:

First rollback:

commit 6cf2b402a2473a20c2be36c794edadb98e18f891
Author: Xavier Perseguers <xavier@causal.ch>
Date:   Wed Feb 24 15:13:44 2021 +0100

    Revert "[TASK] Upgrade Xamarin.AndroidX and G.A.M. packages"
    
    This reverts commit 228239188050c5e36ca0df9cc5f9be02fe6d4a5a.

diff --git a/MyProject.Droid/MyProject.Droid.csproj b/MyProject.Droid/MyProject.Droid.csproj
index a28bb60c..29b34b0d 100644
--- a/MyProject.Droid/MyProject.Droid.csproj
+++ b/MyProject.Droid/MyProject.Droid.csproj
@@ -160,54 +160,54 @@
   <PackageReference Include="Xamarin.Android.Support.Vector.Drawable"><Version>28.0.0.3</Version></PackageReference>
   <PackageReference Include="Xamarin.Android.Support.VersionedParcelable"><Version>28.0.0.3</Version></PackageReference>
   <PackageReference Include="Xamarin.Android.Support.ViewPager"><Version>28.0.0.3</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Activity"><Version>1.2.0.1</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Annotation"><Version>1.1.0.9</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.AppCompat"><Version>1.2.0.7</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Activity"><Version>1.2.0</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Annotation"><Version>1.1.0.8</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.AppCompat"><Version>1.2.0.6</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.AppCompat.Resources"><Version>1.1.0.1</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Arch.Core.Common"><Version>2.1.0.8</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Arch.Core.Runtime"><Version>2.1.0.8</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.AsyncLayoutInflater"><Version>1.0.0.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Browser"><Version>1.3.0.5</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.CardView"><Version>1.0.0.8</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Collection"><Version>1.1.0.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.CoordinatorLayout"><Version>1.1.0.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Core"><Version>1.3.2.3</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.CursorAdapter"><Version>1.0.0.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.CustomView"><Version>1.1.0.6</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.DocumentFile"><Version>1.0.1.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.DrawerLayout"><Version>1.1.1.2</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Fragment"><Version>1.3.0.1</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Interpolator"><Version>1.0.0.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Legacy.Support.Core.UI"><Version>1.0.0.8</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Legacy.Support.Core.Utils"><Version>1.0.0.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4"><Version>1.0.0.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Lifecycle.Common"><Version>2.3.0.1</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData"><Version>2.3.0.1</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData.Core"><Version>2.3.0.1</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Lifecycle.Runtime"><Version>2.3.0.1</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModel"><Version>2.3.0.1</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModelSavedState"><Version>2.3.0.1</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Loader"><Version>1.1.0.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.LocalBroadcastManager"><Version>1.0.0.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Media"><Version>1.2.1.2</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Arch.Core.Common"><Version>2.1.0.7</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Arch.Core.Runtime"><Version>2.1.0.7</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.AsyncLayoutInflater"><Version>1.0.0.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Browser"><Version>1.3.0.4</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.CardView"><Version>1.0.0.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Collection"><Version>1.1.0.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.CoordinatorLayout"><Version>1.1.0.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Core"><Version>1.3.2.2</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.CursorAdapter"><Version>1.0.0.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.CustomView"><Version>1.1.0.5</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.DocumentFile"><Version>1.0.1.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.DrawerLayout"><Version>1.1.1.1</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Fragment"><Version>1.3.0</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Interpolator"><Version>1.0.0.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Legacy.Support.Core.UI"><Version>1.0.0.7</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Legacy.Support.Core.Utils"><Version>1.0.0.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4"><Version>1.0.0.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Lifecycle.Common"><Version>2.3.0</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData"><Version>2.3.0</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData.Core"><Version>2.3.0</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Lifecycle.Runtime"><Version>2.3.0</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModel"><Version>2.3.0</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModelSavedState"><Version>2.3.0</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Loader"><Version>1.1.0.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.LocalBroadcastManager"><Version>1.0.0.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Media"><Version>1.2.1.1</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.Migration"><Version>1.0.8</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.MultiDex"><Version>2.0.1.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Print"><Version>1.0.0.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.RecyclerView"><Version>1.1.0.8</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.SavedState"><Version>1.1.0.1</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.SlidingPaneLayout"><Version>1.1.0.2</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.SwipeRefreshLayout"><Version>1.1.0.2</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Transition"><Version>1.4.0.1</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.VectorDrawable"><Version>1.1.0.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.VectorDrawable.Animated"><Version>1.1.0.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.VersionedParcelable"><Version>1.1.1.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.ViewPager"><Version>1.0.0.7</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.MultiDex"><Version>2.0.1.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Print"><Version>1.0.0.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.RecyclerView"><Version>1.1.0.7</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.SavedState"><Version>1.1.0</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.SlidingPaneLayout"><Version>1.1.0.1</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.SwipeRefreshLayout"><Version>1.1.0.1</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Transition"><Version>1.4.0</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.VectorDrawable"><Version>1.1.0.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.VectorDrawable.Animated"><Version>1.1.0.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.VersionedParcelable"><Version>1.1.1.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.ViewPager"><Version>1.0.0.6</Version></PackageReference>
   <PackageReference Include="Xamarin.Build.Download"><Version>0.10.0</Version></PackageReference>
   <PackageReference Include="Xamarin.Essentials"><Version>1.6.1</Version></PackageReference>
   <PackageReference Include="Xamarin.FFImageLoading"><Version>2.4.11.982</Version></PackageReference>
   <PackageReference Include="Xamarin.FFImageLoading.Forms"><Version>2.4.11.982</Version></PackageReference>
   <PackageReference Include="Xamarin.FFImageLoading.Transformations"><Version>2.4.11.982</Version></PackageReference>
-  <PackageReference Include="Xamarin.Google.Android.Material"><Version>1.3.0.1</Version></PackageReference>
+  <PackageReference Include="Xamarin.Google.Android.Material"><Version>1.3.0</Version></PackageReference>
   <PackageReference Include="Xamarin.Google.Guava.ListenableFuture"><Version>1.0.0.2</Version></PackageReference>
   <PackageReference Include="ZXing.Net.Mobile"><Version>2.4.1</Version></PackageReference>
   <PackageReference Include="ZXing.Net.Mobile.Forms"><Version>2.4.1</Version></PackageReference>

Second rollback:

commit 41e68c8a76ed5edac2666869a815011462dd2de5
Author: Xavier Perseguers <xavier@causal.ch>
Date:   Wed Feb 24 15:16:41 2021 +0100

    Revert "[TASK] Upgrade Xamarin.Google.Android.Material to v1.3.0"
    
    This reverts commit a0ab3be814511485e46203d522f594d7c36a227d.

diff --git a/MyProject.Droid/MyProject.Droid.csproj b/MyProject.Droid/MyProject.Droid.csproj
index 29b34b0d..840be555 100644
--- a/MyProject.Droid/MyProject.Droid.csproj
+++ b/MyProject.Droid/MyProject.Droid.csproj
@@ -207,7 +207,7 @@
   <PackageReference Include="Xamarin.FFImageLoading"><Version>2.4.11.982</Version></PackageReference>
   <PackageReference Include="Xamarin.FFImageLoading.Forms"><Version>2.4.11.982</Version></PackageReference>
   <PackageReference Include="Xamarin.FFImageLoading.Transformations"><Version>2.4.11.982</Version></PackageReference>
-  <PackageReference Include="Xamarin.Google.Android.Material"><Version>1.3.0</Version></PackageReference>
+  <PackageReference Include="Xamarin.Google.Android.Material"><Version>1.2.1.1</Version></PackageReference>
   <PackageReference Include="Xamarin.Google.Guava.ListenableFuture"><Version>1.0.0.2</Version></PackageReference>
   <PackageReference Include="ZXing.Net.Mobile"><Version>2.4.1</Version></PackageReference>
   <PackageReference Include="ZXing.Net.Mobile.Forms"><Version>2.4.1</Version></PackageReference>
diff --git a/MyProject.Droid/Resources/Resource.designer.cs b/MyProject.Droid/Resources/Resource.designer.cs
index bfc367c9..4ef680f2 100644
--- a/MyProject.Droid/Resources/Resource.designer.cs
+++ b/MyProject.Droid/Resources/Resource.designer.cs
@@ -611,6 +611,7 @@ namespace MyProject.Droid
... // lots of changes(!)

Third rollback:

commit 73382592654dfc53f72d4773ce0f47235d4eacdf
Author: Xavier Perseguers <xavier@causal.ch>
Date:   Wed Feb 24 15:19:24 2021 +0100

    Revert "[TASK] Upgrade Xamarin.AndroidX packages"
    
    This reverts commit c3c559a1da8ff066df1e4fcc9f9f16b8e6ed66e1.

diff --git a/MyProject.Droid/MyProject.Droid.csproj b/MyProject.Droid/MyProject.Droid.csproj
index 840be555..6fbc8772 100644
--- a/MyProject.Droid/MyProject.Droid.csproj
+++ b/MyProject.Droid/MyProject.Droid.csproj
@@ -160,7 +160,7 @@
   <PackageReference Include="Xamarin.Android.Support.Vector.Drawable"><Version>28.0.0.3</Version></PackageReference>
   <PackageReference Include="Xamarin.Android.Support.VersionedParcelable"><Version>28.0.0.3</Version></PackageReference>
   <PackageReference Include="Xamarin.Android.Support.ViewPager"><Version>28.0.0.3</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Activity"><Version>1.2.0</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Activity"><Version>1.1.0.6</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.Annotation"><Version>1.1.0.8</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.AppCompat"><Version>1.2.0.6</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.AppCompat.Resources"><Version>1.1.0.1</Version></PackageReference>
@@ -171,30 +171,30 @@
   <PackageReference Include="Xamarin.AndroidX.CardView"><Version>1.0.0.6</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.Collection"><Version>1.1.0.6</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.CoordinatorLayout"><Version>1.1.0.6</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Core"><Version>1.3.2.2</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Core"><Version>1.3.2.1</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.CursorAdapter"><Version>1.0.0.6</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.CustomView"><Version>1.1.0.5</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.CustomView"><Version>1.1.0.4</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.DocumentFile"><Version>1.0.1.6</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.DrawerLayout"><Version>1.1.1.1</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Fragment"><Version>1.3.0</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Fragment"><Version>1.2.5.5</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.Interpolator"><Version>1.0.0.6</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.Legacy.Support.Core.UI"><Version>1.0.0.7</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.Legacy.Support.Core.Utils"><Version>1.0.0.6</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4"><Version>1.0.0.6</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Lifecycle.Common"><Version>2.3.0</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData"><Version>2.3.0</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData.Core"><Version>2.3.0</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Lifecycle.Runtime"><Version>2.3.0</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModel"><Version>2.3.0</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModelSavedState"><Version>2.3.0</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Lifecycle.Common"><Version>2.2.0.4</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData"><Version>2.2.0.4</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData.Core"><Version>2.2.0.4</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Lifecycle.Runtime"><Version>2.2.0.4</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModel"><Version>2.2.0.4</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModelSavedState"><Version>2.2.0.5</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.Loader"><Version>1.1.0.6</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.LocalBroadcastManager"><Version>1.0.0.6</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.Media"><Version>1.2.1.1</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.Migration"><Version>1.0.8</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.MultiDex"><Version>2.0.1.6</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.Print"><Version>1.0.0.6</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.RecyclerView"><Version>1.1.0.7</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.SavedState"><Version>1.1.0</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.RecyclerView"><Version>1.1.0.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.SavedState"><Version>1.0.0.3</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.SlidingPaneLayout"><Version>1.1.0.1</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.SwipeRefreshLayout"><Version>1.1.0.1</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.Transition"><Version>1.4.0</Version></PackageReference>
diff --git a/MyProject.Droid/Resources/Resource.designer.cs b/MyProject.Droid/Resources/Resource.designer.cs
index 4ef680f2..485d57f4 100644
--- a/MyProject.Droid/Resources/Resource.designer.cs
+++ b/MyProject.Droid/Resources/Resource.designer.cs
@@ -600,7 +600,13 @@ namespace MyProject.Droid
... // lots of changes

Fourth "minor upgrade" to make it compile again:

commit c732caf6031fb21a44ea0399f5de06cfd189a048
Author: Xavier Perseguers <xavier@causal.ch>
Date:   Wed Feb 24 15:24:43 2021 +0100

    [BUGFIX] Upgrade Xamarin.AndroidX.Activity to v1.2.0.1
    
    This is mandatory to compile the project after reverting
    other commits.

diff --git a/MyProject.Droid/MyProject.Droid.csproj b/MyProject.Droid/MyProject.Droid.csproj
index 6fbc8772..a81c524d 100644
--- a/MyProject.Droid/MyProject.Droid.csproj
+++ b/MyProject.Droid/MyProject.Droid.csproj
@@ -160,7 +160,7 @@
   <PackageReference Include="Xamarin.Android.Support.Vector.Drawable"><Version>28.0.0.3</Version></PackageReference>
   <PackageReference Include="Xamarin.Android.Support.VersionedParcelable"><Version>28.0.0.3</Version></PackageReference>
   <PackageReference Include="Xamarin.Android.Support.ViewPager"><Version>28.0.0.3</Version></PackageReference>
-  <PackageReference Include="Xamarin.AndroidX.Activity"><Version>1.1.0.6</Version></PackageReference>
+  <PackageReference Include="Xamarin.AndroidX.Activity"><Version>1.2.0.1</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.Annotation"><Version>1.1.0.8</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.AppCompat"><Version>1.2.0.6</Version></PackageReference>
   <PackageReference Include="Xamarin.AndroidX.AppCompat.Resources"><Version>1.1.0.1</Version></PackageReference>

My project compiles fine and (seems) to not crash anymore.

Important: I'm otherwise using the very latest version of the whole VS editor and libraries.

@sisaacks
Copy link
Author

Yeah this did not work for me, I get an error stating material 1.2.1.1 is not compatible with xmarinio10

@xperseguers
Copy link

xperseguers commented Feb 24, 2021

If it helps:

Show/Hide Visual Studio info
=== Visual Studio Community 2019 for Mac ===

Version 8.8.10 (build 2)
Installation UUID: 3123bdfa-e5d1-476d-9bd3-5cf48db57fb5
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

	Package version: 612000122

=== Mono Framework MDK ===

Runtime:
	Mono 6.12.0.122 (2020-02/c621c35ffa0) (64-bit)
	Package version: 612000122

=== Roslyn (Language Service) ===

3.8.0-5.20519.18+4c195c3ac1974edcefa76774d7a59a2350ec55fa

=== NuGet ===

Version: 5.8.0.6860

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/5.0.103/Sdks
SDK Versions:
	5.0.103
	5.0.102
	5.0.101
	5.0.100
	3.1.406
	3.1.405
	3.1.404
	3.1.403
	3.1.402
	3.1.401
	3.1.302
	3.1.301
	3.1.300
	3.1.202
	3.1.200
	3.1.102
	3.1.101
	3.1.100
	3.0.101
	3.0.100
	3.0.100-preview9-014004
	2.1.701
	2.1.700
	2.1.505
	2.1.504
	2.1.503
	2.1.302
	2.1.4
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	5.0.3
	5.0.2
	5.0.1
	5.0.0
	3.1.12
	3.1.11
	3.1.10
	3.1.9
	3.1.8
	3.1.7
	3.1.6
	3.1.5
	3.1.4
	3.1.2
	3.1.1
	3.1.0
	3.0.1
	3.0.0
	3.0.0-preview9-19423-09
	2.1.23
	2.1.22
	2.1.21
	2.1.20
	2.1.19
	2.1.18
	2.1.17
	2.1.16
	2.1.15
	2.1.14
	2.1.13
	2.1.12
	2.1.11
	2.1.9
	2.1.8
	2.1.7
	2.1.2
	2.0.5

=== .NET Core 3.1 SDK ===

SDK: 3.1.406

=== Xamarin.Profiler ===

'/Applications/Xamarin Profiler.app' not found

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 12.4 (17801)
Build 12D4e

=== Xamarin.Mac ===

Version: 7.4.0.10 (Visual Studio Community)
Hash: a4c70e7d0
Branch: xcode12.4
Build date: 2021-02-17 17:40:51-0500

=== Xamarin.iOS ===

Version: 14.10.0.4 (Visual Studio Community)
Hash: 5a05865f6
Branch: xcode12.4
Build date: 2021-01-28 02:30:23-0500

=== Xamarin Designer ===

Version: 16.8.0.510
Hash: 44e3f3ce9
Branch: remotes/origin/d16-8
Build date: 2020-12-10 00:06:14 UTC

=== Xamarin.Android ===

Version: 11.1.0.26 (Visual Studio Community)
Commit: xamarin-android/d16-8/a36ce73
Android SDK: /Users/xavier/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		8.0 (API level 26)
		8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.5
SDK Build Tools Version: 30.0.2

Build Information: 
Mono: 5e9cb6d
Java.Interop: xamarin/java.interop/d16-8@79d9533
ProGuard: Guardsquare/proguard/proguard6.2.2@ebe9000
SQLite: xamarin/sqlite/3.32.1@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-8@2fb1cbc

=== Microsoft OpenJDK for Mobile ===

Java SDK: /Users/xavier/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.8.0.32
Hash: 01a7774
Branch: remotes/origin/d16-8
Build date: 2021-01-14 00:34:58 UTC

=== Android Device Manager ===

Version: 16.8.0.46
Hash: 0a81419
Branch: remotes/origin/d16-8
Build date: 2021-01-14 00:35:22 UTC

=== Build Information ===

Release ID: 808100002
Git revision: f81ffa2444a28c09f173849935ec9ee0195a5b17
Build date: 2021-02-18 12:02:12-05
Build branch: release-8.8
Xamarin extensions: f81ffa2444a28c09f173849935ec9ee0195a5b17

=== Operating System ===

Mac OS X 10.16.0
Darwin 20.4.0 Darwin Kernel Version 20.4.0
    Wed Feb 10 23:06:18 PST 2021
    root:xnu-7195.100.326.0.1~76/RELEASE_X86_64 x86_64

=== Enabled user installed extensions ===

Essential UI Kit for Xamarin.Forms - Syncfusion 1.0.0.0

I compile targeting Android 11.0 (R) - API Level 30 but with compatibility down to 5.1 - API Level 22.

I am using XF 5.0.0.2012 but found few versions back that "somehow" I don't need to have it referenced in my Android project. Don't know why because I need it for iOS and have it naturally in my UI and other projects otherwise.

@sisaacks
Copy link
Author

Well maybe they will fix this....I am down in the water until they do.....so frustrating

@sisaacks
Copy link
Author

The files I updated that caused this issue were:

Xamarin.AndroidX.MediaRouter 1.2.1 -> 1.2.2.1
Xamarin.AndroidX.LeanBack 1.0.0.6 -> 1.0.0.7
Xamarin.AndroidX.Palette 1.0.0.6 -> 1.0.0.7

when I rolled the files back I no longer have the issue

@StephaneDelcroix
Copy link
Member

a hard clean (removing all obj/ and bin/ folders usually solves the issue

@tci-ash
Copy link

tci-ash commented Feb 25, 2021

@StephaneDelcroix That was the first thing I tried. The only thing I have not tried is reformatting my machine.,

@varyamereon
Copy link

varyamereon commented Feb 26, 2021

a hard clean (removing all obj/ and bin/ folders usually solves the issue

Did not work for me either.

The files I updated that caused this issue were:

Xamarin.AndroidX.MediaRouter 1.2.1 -> 1.2.2.1
Xamarin.AndroidX.LeanBack 1.0.0.6 -> 1.0.0.7
Xamarin.AndroidX.Palette 1.0.0.6 -> 1.0.0.7

when I rolled the files back I no longer have the issue

I don't have any of these files, will see what else I can rollback that may fix it.

EDIT:

I rolled back these four files and the issue is gone, not sure which was causing it:

Xamarin.AndroidX.Core 1.3.2.3 -> 1.3.2.1
Xamarin.AndroidX.Lifecycle.Runtime 2.3.0.1 -> 2.2.0.4
Xamarin.AndroidX.Lifecycle.Extensions 2.2.0.7 -> 2.2.0.6
Xamarin.AndoridX.Annotation 1.1.0.9 -> 1.1.0.8

@scream4-me
Copy link

scream4-me commented Feb 28, 2021

Just updated all the AndroidX packages from 1.0.0.7 to 1.0.0.8 in a Xamarin Forms project and this problem started happening for me as well. Downgrading to the previous 1.0.07 version and doing a full clean it worked again.

Huawei Nexus 6P
Android 8.10

androidx.fragment.app.FragmentAnim.loadAnimation
FragmentAnim.java, line 79
android.content.res.Resources$NotFoundException: Unable to find resource ID #0xffffffff

Stack trace:
android.content.res.ResourcesImpl.getResourceTypeName ResourcesImpl.java:269
android.content.res.Resources.getResourceTypeName Resources.java:1965
androidx.fragment.app.FragmentAnim.loadAnimation FragmentAnim.java:79
androidx.fragment.app.DefaultSpecialEffectsController$AnimationInfo.getAnimation DefaultSpecialEffectsController.java:774
androidx.fragment.app.DefaultSpecialEffectsController.startAnimations DefaultSpecialEffectsController.java:144
androidx.fragment.app.DefaultSpecialEffectsController.executeOperations DefaultSpecialEffectsController.java:120
androidx.fragment.app.SpecialEffectsController.executePendingOperations SpecialEffectsController.java:294
androidx.fragment.app.FragmentManager.executeOpsTogether FragmentManager.java:2190
androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute FragmentManager.java:2088
androidx.fragment.app.FragmentManager.execPendingActions FragmentManager.java:1990
androidx.fragment.app.FragmentManager$5.run FragmentManager.java:524
android.os.Handler.handleCallback Handler.java:790
android.os.Handler.dispatchMessage Handler.java:99
android.os.Looper.loop Looper.java:164
android.app.ActivityThread.main ActivityThread.java:6494
java.lang.reflect.Method.invoke Method.java
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run RuntimeInit.java:438
com.android.internal.os.ZygoteInit.main ZygoteInit.java:807

@markusroessler
Copy link

markusroessler commented Feb 28, 2021

I just faced the issue after upgrading Xamarin.Google.Android.Material to 1.3.0.
This i found out so far:
The issue is related to Version 1.3.0 of Xamarin.AndroidX.Fragment (downgrading this to 1.2.5.5 fixes the issue) and is triggered by Xamarin.Forms.Platform.Android.ShellRenderer.SwitchFragment. If I hold the debugger there and set the animated arg to false the exception doesn't occur!

erroneous line in ShellRenderer:
if (animate) transaction.SetTransitionEx((int)global::Android.App.FragmentTransit.EnterMask);

According to Android docs "EnterMask" is not a valid value:

Select a standard transition animation for this transaction. May be one of TRANSIT_NONE, TRANSIT_FRAGMENT_OPEN, TRANSIT_FRAGMENT_CLOSE, or TRANSIT_FRAGMENT_FADE.

@tci-ash
Copy link

tci-ash commented Mar 1, 2021

This makes sense. As the crash does not happens in constructor or OnNavigating or onNavigated.
Is there a way to disable animation?

This was my experience, AndroidX.Fragment or no Fragment, if you have Xamarin.Google.Android.Material 1.3.0 or over , the problem appears, but 1.2.1.1 solves the problem.

@markusroessler
Copy link

@tci-as you could create a custom renderer and override ShellRenderer.SwitchFragment. In this method you just invoke the base method with animate set to false:

protected override void SwitchFragment(FragmentManager manager, Android.Views.View targetView, ShellItem newItem, bool animate = true)
{
      base.SwitchFragment(manager, targetView, newItem, animate: false);
 }

@sisaacks
Copy link
Author

sisaacks commented Mar 1, 2021

This is all great...but when will this actually be fixed??

@PureWeen
Copy link
Contributor

PureWeen commented Mar 3, 2021

I wonder if this is related
#13303

Can you attach reproduction of the issue?
If you just remove all AndroidX packages from your csproj file does that fix?

@PureWeen PureWeen added s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. labels Mar 3, 2021
@sisaacks
Copy link
Author

sisaacks commented Mar 3, 2021

@PureWeen update to the latest android files.....and try to navigate using the flyout with Android.

@Redth Redth removed s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. labels Mar 4, 2021
@redradist
Copy link

If anyone can test out the nugets here with your particular scenario

https://dev.azure.com/xamarin/public/_build/results?buildId=38683&view=artifacts&pathAsName=false&type=publishedArtifacts

The approach taken here was to update to the set of nugets listed here
xamarin/AndroidX#283 (comment)

I pinned them on the minor version, mainly because we can't really account for cases where android breaks APIs that cause the application to crash as you move up versions. For XF 5 it makes the most sense to pin the range so users don't see unexpected crashes

If we need to release an updated/tested set of libraries we will

If anyone can test these artifacts and let us know if the range of AndroidX doesn't work for you or if you have other crashes that would be super helpful

@PureWeen How to install this nuget package from Azure ? Is there instruction ?

@redradist
Copy link

@PureWeen Figured out how to install, but this workaround still do not work
Mentioned it here #13975 (comment)

@GSDan
Copy link

GSDan commented Jun 6, 2021

Also getting this. Happens from a fresh Forms project once I install Xamarin.Firebase.Auth 120.0.4.

@ivanrlg
Copy link

ivanrlg commented Jun 7, 2021

Any workaround or fix yet? Nothing in this thread has worked for me.

@fidelorozco
Copy link

This problem hit me in my Xamarin Forms with a AppShell (that was working perfectly), after upgraded to the last version of many Google AndroidX Nuget Packages. Compiles, but running started to crash with the message error of this post when opened the menu to change to another page. The solution in my case: I downgraded to the previous version all the libraries one by one and the culprit seems to be the Xamarin.AndroidX.Legacy.Support.V4. The v1.0.0.6 was the last one that worked without problems for me. I don't know the reason.

@Reddyo
Copy link

Reddyo commented Jun 8, 2021

For me, the issue appeared after updating Xamarin.GooglePlayServices.Maps to latest 117.0.1
The issue went away after downgrading the same package to version 71.1610.4

@AlexanderVanMeerten
Copy link

AlexanderVanMeerten commented Jun 9, 2021

Could someone from the Xamarin Forms team please tell us when this issue will be fixed?

@tci-ash
Copy link

tci-ash commented Jun 9, 2021 via email

@PureWeen
Copy link
Contributor

PureWeen commented Jun 9, 2021

We're prepping an SR that should resolve most (if not all) your issues

Here's the PR
#14101

I do worry about a few manifestations of exceptions happening here and it's a little tricky keeping up with what people have/haven't tried

If you are running into this issue and can test the nugets here
https://dev.azure.com/xamarin/public/_build/results?buildId=41351&view=artifacts&pathAsName=false&type=publishedArtifacts

If your particular issues isn't resolved can you attach a reproduction so that I can try to see why your particular issues isn't addressed?

@Kukkimonsuta
Copy link

@PureWeen Upgrading to these packages from CI did solve Unable to find resource ID #0xffffffff for us and we haven't encountered any other issues so far.

@edparitor
Copy link

@PureWeen Upgrading to these packages from CI did solve Unable to find resource ID #0xffffffff for us and we haven't encountered any other issues so far. What's the likely date for XF5 SR4?

@edparitor
Copy link

@PureWeen could you push 5.0.0.7298 into nuget.org as a pre-release?

@wagenheimer
Copy link

I have the same problem! Could you please push 5.0.0.7298 into nuget.org as a pre-release?

@CsabaZsigmond
Copy link

@PureWeen Could you please push 5.0.0.7298 into nuget.org as a pre-release?

@NunoBem
Copy link

NunoBem commented Jun 21, 2021

@PureWeen when is the SR due?

@sisaacks
Copy link
Author

So...what is the release version we are supposed to update too? I see 5.0.0 but that was the version that caused the issues wasn't it?

@MattePozzy
Copy link

Hi,
any news about the release of this fix? We need to release our application on 20th of July but we are unable to do because this issue.

@MickCG
Copy link

MickCG commented Jul 9, 2021

I get the same error when I call a WebView to login with Facebook authentication only on Android. When I run the app on iOS no problem. So this error is happening in various places needless to say.

@jinbatsu
Copy link

I rolled back these four files and the issue is gone, not sure which was causing it:

Xamarin.AndroidX.Core 1.3.2.3 -> 1.3.2.1
Xamarin.AndroidX.Lifecycle.Runtime 2.3.0.1 -> 2.2.0.4
Xamarin.AndroidX.Lifecycle.Extensions 2.2.0.7 -> 2.2.0.6
Xamarin.AndoridX.Annotation 1.1.0.9 -> 1.1.0.8

Hi @varyamereon, it worked for me with this rollback!

@MickCG
Copy link

MickCG commented Jul 17, 2021

In my case the very latest update to Xamarin.forms fixed the problem. I am off and running!

@jinbatsu
Copy link

In my case the very latest update to Xamarin.forms fixed the problem.

Great to hear that,.. I already try in Mac and it does not work, even if it work, I use Comunity Toolkit, annd the latest Xamarin.Form version does not meet the maximum requirement.

@TheCodeTraveler
Copy link
Contributor

TheCodeTraveler commented Jul 18, 2021

@jinbatsu Xamarin.CommunityToolkit v1.3.0 supports the latest version of Xamarin.Forms, v5.0.0.2083.

@zirtrex
Copy link

zirtrex commented Apr 3, 2022

Hi everyone, I have de same problem, it was install Lottie 4.1, I downgrade to 3.0 and work. I hope helps yours.

@jtrimm007
Copy link

Hi everyone, I have de same problem, it was install Lottie 4.1, I downgrade to 3.0 and work. I hope helps yours.

This worked for me as well. I guess Airbnb Lottie has some issue with the newer Xamarin stuff. Thanks for posting your answer, I would have never figured that out.

The only thing different I did was lower the Android.Lottie to 3.0.3 as well.

@alexdresko
Copy link

I solved this problem by removing all of the Xamarin.Android.Support.* and Xamarin.AndroidX.* packages from my csproj files. I immediately stopped getting those errors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.