Forum Xamarin.Android

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

sisaackssisaacks Member ✭✭✭

I updated Android this morning, now every time I try to use the flyout navigation the app crashes with this error: android.content.res.Resources$NotFoundException: Unable to find resource ID #0xffffffff

Does anyone have any idea what is going on and why?

02-23 12:31:03.825 E/tForceMobileAp(28502): No package ID ff found for ID 0xffffffff.
02-23 12:31:03.825 D/AndroidRuntime(28502): Shutting down VM
02-23 12:31:03.826 E/AndroidRuntime(28502): FATAL EXCEPTION: main
02-23 12:31:03.826 E/AndroidRuntime(28502): Process: com.companyname.NightForceMobileApp, PID: 28502
02-23 12:31:03.826 E/AndroidRuntime(28502): android.content.res.Resources$NotFoundException: Unable to find resource ID #0xffffffff
02-23 12:31:03.826 E/AndroidRuntime(28502): at android.content.res.ResourcesImpl.getResourceTypeName(ResourcesImpl.java:331)
02-23 12:31:03.826 E/AndroidRuntime(28502): at android.content.res.Resources.getResourceTypeName(Resources.java:2197)
02-23 12:31:03.826 E/AndroidRuntime(28502): at androidx.fragment.app.FragmentAnim.loadAnimation(FragmentAnim.java:79)
02-23 12:31:03.826 E/AndroidRuntime(28502): at androidx.fragment.app.DefaultSpecialEffectsController$AnimationInfo.getAnimation(DefaultSpecialEffectsController.java:774)
02-23 12:31:03.826 E/AndroidRuntime(28502): at androidx.fragment.app.DefaultSpecialEffectsController.startAnimations(DefaultSpecialEffectsController.java:144)
02-23 12:31:03.826 E/AndroidRuntime(28502): at androidx.fragment.app.DefaultSpecialEffectsController.executeOperations(DefaultSpecialEffectsController.java:120)
02-23 12:31:03.826 E/AndroidRuntime(28502): at androidx.fragment.app.SpecialEffectsController.executePendingOperations(SpecialEffectsController.java:294)
02-23 12:31:03.826 E/AndroidRuntime(28502): at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2190)
02-23 12:31:03.826 E/AndroidRuntime(28502): at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2088)
02-23 12:31:03.826 E/AndroidRuntime(28502): at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1990)
02-23 12:31:03.826 E/AndroidRuntime(28502): at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:524)
02-23 12:31:03.826 E/AndroidRuntime(28502): at android.os.Handler.handleCallback(Handler.java:883)
02-23 12:31:03.826 E/AndroidRuntime(28502): at android.os.Handler.dispatchMessage(Handler.java:100)
02-23 12:31:03.826 E/AndroidRuntime(28502): at android.os.Looper.loop(Looper.java:237)
02-23 12:31:03.826 E/AndroidRuntime(28502): at android.app.ActivityThread.main(ActivityThread.java:8167)
02-23 12:31:03.826 E/AndroidRuntime(28502): at java.lang.reflect.Method.invoke(Native Method)
02-23 12:31:03.826 E/AndroidRuntime(28502): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
02-23 12:31:03.826 E/AndroidRuntime(28502): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
Android.Content.Res.Resources+NotFoundException: 'Unable to find resource ID #0xffffffff'

Best Answer

  • sisaackssisaacks Member ✭✭✭
    Accepted Answer

    The files I updated that caused this issue were when I updated the following files to the newer version

    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

«1

Answers

  • MarcioOrdonezMarcioOrdonez USMember ✭✭
    For me too, today.

    I've tried everything without success so far. :/
  • sisaackssisaacks Member ✭✭✭

    @MarcioOrdonez I have tried a lot of things...spent a few hours trying..but realized its something due to the update. Is it just me or is installing updates like going to the dentist

  • MarcioOrdonezMarcioOrdonez USMember ✭✭
    @sisaacks

    Mee too. At least 6 hours of research, but unfortunately I couldn't solve it. Until yesterday it was ok. The problem is with Android, with iOS is running normally.
  • sisaackssisaacks Member ✭✭✭

    @MarcioOrdonez Yeah I updated some controls today and some Android Files and then "POOF" navigation stopped working. Yeah Android only. This is the 3rd time Xamarin has updated Android and something has broken since I started my project. Have you tried to upload your IOS IPA lately? They changed that too, now you have to download an app called Transport to upload your IPA. I took me a couple hours of googling to find that out.....I found one article on it.

  • sisaackssisaacks Member ✭✭✭

    @MarcioOrdonez as to the IOS comment above, that depends on if you're using a windows box for development or not. I dread updates.....never fails....something always breaks with updates...platform...device...or third party controls

  • axemanaxeman USMember ✭✭

    Any update on this? How do we go back to a previous version of Xamarin Android?

  • sisaackssisaacks Member ✭✭✭

    @axeman I would imagine in the next day or two they will release something with an issue this big. LOL...I am glad I am not the only one! I was like......WTH!!! NOT AGAIN! I am not sure how to go back, I would assume you would need to use the nuget manager and revert the android files that were updated.....unfortunately...I dont remember what files I updated...next time I will take a snap shot before I do!!

  • MarcioOrdonezMarcioOrdonez USMember ✭✭
    @sisaacks @axeman

    I updated my visual Studio a fez hours ago :(

    I found a reference that I haven't tested yet, which is to assign an id to all xaml controls. Maybe putting x:Name will work?

    https://stackoverflow.com/questions/39815905/android-messed-up-r-java-unable-to-find-resource-id-0xffffffff
  • sisaackssisaacks Member ✭✭✭

    @MarcioOrdonez that doesn't make any sense to me because the app loads...it only fails when I try to use the flyout navigation. I guess you're right. I did update visual studio as well as the files. hmmmmm maybe it is visual studio.

  • MarcioOrdonezMarcioOrdonez USMember ✭✭
    @sisaacks Last month I created a poc for xamarin forms, the ones that come ready in visual Studio. I created an App with flyout. I rescued it now and it works normally, so I think there must be some problem related to Visual Studio updates.
  • sisaackssisaacks Member ✭✭✭

    @MarcioOrdonez maybe it has to do with VS but it only happens with flyout navigation. However given that I updated both, I submitted to VS as well. If you happen to find the issue please let me know. Are you having the same issue as me?

  • MarcioOrdonezMarcioOrdonez USMember ✭✭
    @sisaacks yes, after click on flyoutitem I receive:

    Android.Content.Res.Resources+NotFoundException: 'Unable to find resource ID #0xffffffff'
  • axemanaxeman USMember ✭✭

    @MarcioOrdonez thats the error I am getting too. the SO article sounds promising, I have pretty much wasted my day on this.

  • MarcioOrdonezMarcioOrdonez USMember ✭✭
    @sisaacks I just tested an App that I published 4 days ago that Google Play has just approved. There was no error with the flyoutitem. So it could be that the problem is with a specific package that I also updated today. F*cking updates!
  • sisaackssisaacks Member ✭✭✭

    @MarcioOrdonez @axeman I updated some nuget packages for Android today as well as visual studio. I am assuming it was the Xamarin android nuget packages that caused this. Did you guys update any xamarin android nuget packages? Yeah.....I am sick of updates. I am running Suncfusion Controls and they seem to break something with every update.

  • MarcioOrdonezMarcioOrdonez USMember ✭✭
    edited February 24

    @axeman @sisaacks
    Follow my git compare

  • axemanaxeman USMember ✭✭

    @MarcioOrdonez said:
    @sisaacks @axeman

    I updated my visual Studio a fez hours ago :(

    I found a reference that I haven't tested yet, which is to assign an id to all xaml controls. Maybe putting x:Name will work?

    https://stackoverflow.com/questions/39815905/android-messed-up-r-java-unable-to-find-resource-id-0xffffffff

    So, to test this theory I stripped out every control from one of my pages and made it bare bone with just one stacklayout.
    And I named it too. Still the same result.
    What is confusing is, Xaminal sample project seems to work without any issues. This is baffling.

  • sisaackssisaacks Member ✭✭✭

    @MarcioOrdonez you have outlined the file updates....I can't see exactly which they are. Hopefully they will just get this fixed. Can you send us the Deltas

  • MarcioOrdonezMarcioOrdonez USMember ✭✭

    @sisaacks follow the working poc

  • sisaackssisaacks Member ✭✭✭

    @MarcioOrdonez i am not sure what you're saying?????

  • sisaackssisaacks Member ✭✭✭

    @MarcioOrdonez did you figure out a solution? I am not understanding

  • MarcioOrdonezMarcioOrdonez USMember ✭✭
    edited February 24

    @sisaacks @axeman

    I found the problem. There really were some packages. I reversed the following packages (6 packages working now):

    <PackageReference Include="Xamarin.Forms" Version="5.0.0.1931" />
    <PackageReference Include="Xamarin.GooglePlayServices.Basement">
          <Version>117.5.0</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.GooglePlayServices.Base">
          <Version>117.5.0</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData">
          <Version>2.2.0.4</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.Google.Android.Material">
          <Version>1.2.1.1</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.AndroidX.MediaRouter">
          <Version>1.2.1</Version>
    </PackageReference>
    
  • sisaackssisaacks Member ✭✭✭

    @MarcioOrdonez all i see is number i dont see package names...not sure what to reverse.
    can you include names as well?
    good looking [email protected] will fill fix this sooner than later

  • MarcioOrdonezMarcioOrdonez USMember ✭✭

    @sisaacks Update this page, Sorry...

    I forgot to put the "code" tag to show the XML of the packages.

  • sisaackssisaacks Member ✭✭✭

    @MarcioOrdonez i am not sure that i am using all of those. Thank you for the reference. Hopefully they will fix this soon. so annoying. What is the code tag you are referring too? The packager numbers you listed above, you reverted to the one before that one?

  • axemanaxeman USMember ✭✭

    Sadly, @MarcioOrdonez it does not work.

  • sisaackssisaacks Member ✭✭✭

    @axeman i am sure they will come out with something in a day or two with a break this big

  • sisaackssisaacks Member ✭✭✭

    I submitted a bug on GitHub...you can search for it there and add to it

  • sisaackssisaacks Member ✭✭✭
  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Thanks for your update in Github, please waitting for update in this thread.

  • MarcioOrdonezMarcioOrdonez USMember ✭✭
    edited February 24
    @sisaacks @axeman

    There is an answer on github issue page.

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

    I've downgraded too Xamarin.Google.Android.Material (and 5 other packages) for this version, and it worked!

    Maybe the only wrong package is Xamarin.Google.Android.Material
  • MarcioOrdonezMarcioOrdonez USMember ✭✭

    @sisaacks @axeman

    Xamarin.Google.Android.Material was updated yesterday! (1.3.0.1)

    Do not install this package from version 1.3.0 and higher

  • sisaackssisaacks Member ✭✭✭

    @MarcioOrdonez well you're lucky then....I tried to download and I get an error stating 1.2.1.1 is not compatible with netstandard2.0

  • sisaackssisaacks Member ✭✭✭

    I am not using Xamarin.Google.Android.Material........so frustrating

  • MarcioOrdonezMarcioOrdonez USMember ✭✭

    @sisaacks Are you using Android project with or without Xamarin.Forms?

  • sisaackssisaacks Member ✭✭✭

    I am using Xamarin Forms Shell Application...I have both IOS and Android. I do not have the file you speak of though.
    I am not sure what files I need to roll back its extremely frustrating.

  • sisaackssisaacks Member ✭✭✭

    My repo shows that Xamarin AndroidX MediaRouter
    Xamarin AndroidX leanback
    Xamarin AndroidX Pallete

  • sisaackssisaacks Member ✭✭✭

    Sorry I hit the wrong key...the files I posted above were the Android files updated, I am going to try and roll those back

  • sisaackssisaacks Member ✭✭✭

    @MarcioOrdonez when i try to roll back those files i get its not compaitable with netstandard2.0

  • sisaackssisaacks Member ✭✭✭

    @MarcioOrdonez I figured out what I was doing wrong.....i accidently had the main project checked when trying install the older version. I am back up and running now

Sign In or Register to comment.