Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net9 rc3: Could not inflate Behavior subclass com.google.android.material.bottomsheet.BottomSheetBehavior #137

Open
softlion opened this issue Oct 23, 2024 · 4 comments

Comments

@softlion
Copy link

I upgraded a project to net9 rc3, and when trying to display the bottom sheet,
it is crashing with that message:

`the49_maui_bottom_sheet_design: Could not inflate Behavior subclass com.google.android.material.bottomsheet.BottomSheetBehavior`

Any idea how to workaround or fix ?

Using an android simulator Pixel5 API 34, and a maui app

related stack trace:

   at Android.Views.View.Inflate(Context context, Int32 resource, ViewGroup root) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net9.0/android-35/mcw/Android.Views.View.cs:line 17974
   at The49.Maui.BottomSheet.BottomSheetController.EnsureWindowContainer()
   at The49.Maui.BottomSheet.BottomSheetController.Show(Boolean animated)
   at The49.Maui.BottomSheet.BottomSheetManager.PlatformShow(Window window, BottomSheet sheet, Boolean animated)
   at The49.Maui.BottomSheet.BottomSheetManager.Show(Window window, BottomSheet sheet, Boolean animated)
   at The49.Maui.BottomSheet.BottomSheet.ShowAsync(Window window, Boolean animated)
@softlion
Copy link
Author

@softlion softlion reopened this Oct 28, 2024
@SoureMaster
Copy link

Looks like there are compatiblity issues.

Severity Code Description Project File Line Suppression State
Error (active) NU1202 Package Vapolia.The49.Maui.BottomSheet 8.0.4-ci-11723878490 is not compatible with net9.0-maccatalyst18.0 (.NETCoreApp,Version=v9.0) / android-arm64. Package Vapolia.The49.Maui.BottomSheet 8.0.4-ci-11723878490 supports:

  • net8.0-android34.0 (.NETCoreApp,Version=v8.0)
  • net8.0-ios18.0 (.NETCoreApp,Version=v8.0)
  • net9.0-android35.0 (.NETCoreApp,Version=v9.0)
  • net9.0-ios18.0 (.NETCoreApp,Version=v9.0) DTL.Main (net9.0-android)

@softlion
Copy link
Author

Bottom sheet has never supported maccatalyst so I removed the tfm.

Remove maccatalyst from your targets.

@happyfr34k
Copy link

Hello.
Thanks to @softlion for the fix.
Will this fix be merged into the main branch?

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

No branches or pull requests

3 participants