-
Notifications
You must be signed in to change notification settings - Fork 486
Description
Is there an existing issue for this?
- I have searched the existing issues
Did you read the "Reporting a bug" section on Contributing file?
- I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
Current Behavior
Saw the video of Gerald Versluis:
https://www.youtube.com/watch?v=XFVrIyAzsk4
Tried to implement the same logic for my .NET 9 project and when you debug the app and try to open the app. Unfortunately I cannot revert to .NET 8. The result is:
System.MissingMethodException: Method not found: void AndroidX.Camera.Core.Preview.SetSurfaceProvider(AndroidX.Camera.Core.Preview/ISurfaceProvider)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[d__14](d__14& stateMachine)
at CommunityToolkit.Maui.Core.CameraManager.StartUseCase(CancellationToken token)
at CommunityToolkit.Maui.Core.CameraManager.<>c__DisplayClass41_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Android.App.SyncContext.<>c__DisplayClass2_0.b__0() in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.App/SyncContext.cs:line 36
at Java.Lang.Thread.RunnableImplementor.Run() in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:line 37
at Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net9.0/android-35/mcw/Java.Lang.IRunnable.cs:line 59
at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 22
Expected Behavior
Camera should be able to open and take picture
Steps To Reproduce
- Open and run the solution on android target sdk 35
Link to public reproduction project repository
https://github.com/MarianHristov92/MauiCameraViewNet9
Environment
- .NET MAUI CommunityToolkit:9.1.1
- .NET MAUI CommunityToolkit.Maui.Camera: 1.0.5
- OS: ANDROID 15
- .NET MAUI: 9.0.12Anything else?
No response