-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[android] update Xamarin.Google.Guava.ListenableFuture #5305
Conversation
Fixes: dotnet/android-libraries#509 Building a MAUI project with a certain set of AndroidX dependencies: <PackageReference Include="Xamarin.AndroidX.Core" Version="1.7.0" /> <PackageReference Include="Xamarin.AndroidX.Camera.Lifecycle" Version="1.0.2.3" /> <PackageReference Include="Xamarin.AndroidX.Camera.Camera2" Version="1.0.2.3" /> <PackageReference Include="Xamarin.AndroidX.Camera.View" Version="1.0.0.5-alpha20" /> Fails with: Xamarin.Android.D8.targets(79,5): error : java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: /Users/imac/.nuget/packages/xamarin.google.guava.listenablefuture/1.0.0.5/buildTransitive/net6.0-android31.0/../../jar/guava-listenablefuture.jar : com/google/common/util/concurrent/ListenableFuture.class If we look at the contents of: C:\Program Files\dotnet\packs\Microsoft.Maui.Controls.Ref.android\6.0.200-preview.14.5099\ref\net6.0-android30.0\Microsoft.Maui.Controls.aar There is a `libs\FCEFAF10B0757418.jar` inside that contains the contents of `guava-listenablefuture.jar`! This was a fix for `Xamarin.Google.Guava.*`: xamarin/XamarinComponents#1313 MAUI is not using the latest version of this package, so we can specify `Xamarin.Google.Guava.ListenableFuture` explicitly. Now there are no `.jar` files in `Microsoft.Maui.aar`. Another approach is to update to the very latest AndroidX packages -- right now we are blocked on trying to get them all on the `dotnet-public` feed. So we can take that approach later on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This package also has it inside! https://www.nuget.org/api/v2/package/Xamarin.AndroidX.Concurrent.Futures/1.1.0.5 The 1.1.0.6 one seems ok. |
I keep hitting issues here with other dependencies, I think we just need to update AndroidX to fix this problem. |
Do you know if there is an update on this or a workaround? I am still unable to start up my .NET MAUI project |
Context: dotnet#5305 Fixes: dotnet/android-libraries#509 Update to the latest AndroidX packages, so we also use the latest Xamarin.Google.Guava.ListenableFuture This currently has build failures: src\Core\src\Platform\Android\Navigation\StackNavigationManager.cs(145,41): error CS1061: 'NavController' does not contain a definition for 'BackStack' and no accessible extension method 'BackStack' accepting a first argument of type 'NavController' could be found (are you missing a using directive or an assembly reference?) src\Core\src\Platform\Android\Navigation\StackNavigationManager.cs(188,48): error CS1061: 'NavController' does not contain a definition for 'BackStack' and no accessible extension method 'BackStack' accepting a first argument of type 'NavController' could be found (are you missing a using directive or an assembly reference?) src\Core\src\Platform\Android\Navigation\StackNavigationManager.cs(245,51): error CS1061: 'NavController' does not contain a definition for 'BackStack' and no accessible extension method 'BackStack' accepting a first argument of type 'NavController' could be found (are you missing a using directive or an assembly reference?) Looking at: ~\.nuget\packages\xamarin.androidx.navigation.runtime\2.4.1\lib\net6.0-android31.0\Xamarin.AndroidX.Navigation.Runtime.dll I can't find: [Register("androidx/navigation/NavController", DoNotGenerateAcw = true)] public class NavController : Object { public unsafe virtual IDeque BackStack { [Register("getBackStack", "()Ljava/util/Deque;", "GetGetBackStackHandler")] get; But it's not documented here either: https://developer.android.com/reference/androidx/navigation/NavController
Closing in favor of #5588 |
* [android] update to the latest AndroidX packages Context: #5305 Fixes: dotnet/android-libraries#509 Update to the latest AndroidX packages, so we also use the latest Xamarin.Google.Guava.ListenableFuture This currently has build failures: src\Core\src\Platform\Android\Navigation\StackNavigationManager.cs(145,41): error CS1061: 'NavController' does not contain a definition for 'BackStack' and no accessible extension method 'BackStack' accepting a first argument of type 'NavController' could be found (are you missing a using directive or an assembly reference?) src\Core\src\Platform\Android\Navigation\StackNavigationManager.cs(188,48): error CS1061: 'NavController' does not contain a definition for 'BackStack' and no accessible extension method 'BackStack' accepting a first argument of type 'NavController' could be found (are you missing a using directive or an assembly reference?) src\Core\src\Platform\Android\Navigation\StackNavigationManager.cs(245,51): error CS1061: 'NavController' does not contain a definition for 'BackStack' and no accessible extension method 'BackStack' accepting a first argument of type 'NavController' could be found (are you missing a using directive or an assembly reference?) Looking at: ~\.nuget\packages\xamarin.androidx.navigation.runtime\2.4.1\lib\net6.0-android31.0\Xamarin.AndroidX.Navigation.Runtime.dll I can't find: [Register("androidx/navigation/NavController", DoNotGenerateAcw = true)] public class NavController : Object { public unsafe virtual IDeque BackStack { [Register("getBackStack", "()Ljava/util/Deque;", "GetGetBackStackHandler")] get; But it's not documented here either: https://developer.android.com/reference/androidx/navigation/NavController * - replace with BackQueue * - fix tests * $(NoWarn) XA4218 * $(MSBuildWarningsAsMessages) I mean Co-authored-by: Shane Neuville <[email protected]>
Fixes: dotnet/android-libraries#509
Building a MAUI project with a certain set of AndroidX dependencies:
Fails with:
If we look at the contents of:
There is a
libs\FCEFAF10B0757418.jar
inside that contains thecontents of
guava-listenablefuture.jar
!This was a fix for
Xamarin.Google.Guava.*
:xamarin/XamarinComponents#1313
MAUI is not using the latest version of this package, so we can
specify
Xamarin.Google.Guava.ListenableFuture
explicitly. Now thereare no
.jar
files inMicrosoft.Maui.aar
.Another approach is to update to the very latest AndroidX packages --
right now we are blocked on trying to get them all on the
dotnet-public
feed. So we can take that approach later on.