Add type forwards for AndroidX.Lifecycle*
2.8.*
changes.
#908
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: #863
Fixes: dotnet/android#9049
Fixes: #909
In version
2.8.*
, Google moved all the types in 2 libraries into 2 new libraries:Xamarin.AndroidX.Lifecycle.Common
toXamarin.AndroidX.Lifecycle.Common.Jvm
.Xamarin.AndroidX.Lifecycle.ViewModel
toXamarin.AndroidX.Lifecycle.ViewModel.Android
.While this is a source compatible change for users, it is not a binary compatible change for users that are relying on NuGets or assemblies that have not been recompiled.
These types may continue to work in Debug builds, but the linker and AOT compiler steps run for Release builds are unable to resolve the moved types, causing unfixable errors (other than recompiling all assemblies).
Adding
[TypeForwardedToAttribute]
attributes allows the linker and AOT to succeed without recompiling old assemblies.