Xamarin.MediaGallery icon indicating copy to clipboard operation
Xamarin.MediaGallery copied to clipboard

.NET 6, Maui and VS 17.3.2

Open simoncruise opened this issue 2 years ago • 0 comments

Description

Won't work with .NET 6 and latest VS Maui release

Actual Behavior

When trying to run on the Android emulator, I get this error

Error java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: *****nuget\packages\xamarin.google.guava.listenablefuture\1.0.0.9\buildTransitive\net6.0-android31.0....\jar\guava-listenablefuture.jar : com/google/common/util/concurrent/ListenableFuture.class SeeingAI.Android C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.415\tools\Xamarin.Android.D8.targets 79

Which I was able to fix by following this thread https://github.com/xamarin/AndroidX/issues/595

But, when I run MediaGallery.PickAsync, I get the following exception

Could not resolve type with token 0100005c from typeref (expected class 'Microsoft.Maui.Essentials.Platform' in assembly 'Microsoft.Maui.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null')

Configuration

  • Device: Android
  • OS Version: Any
  • Plugin Version: 2.1.1
  • Framework: MAUI .NET 6

simoncruise avatar Sep 08 '22 10:09 simoncruise