You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 20, 2023. It is now read-only.
After updating target sdk version from 26 to 28 (to meet google play api level requirements) my app began crashing at startup with following error:
10-15 21:43:19.784 22915 22915 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #20: Error inflating class android.support.v7.widget.FitWindowsFrameLayout 10-15 21:43:19.784 22915 22915 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.FitWindowsFrameLayout"
After digging a lot I found out that that generated obj/90/proguard_project_references.cfg files has missed a lot of keep rules in comparison to obj/80/proguard_project_references.cfg, for instance
-keep class android.support.v7.widget.FitWindowsFrameLayout
Looking into the reason why this happening I finally found out that monoandroid90 assembly from nuget package has LinkerSafe attribute:
So I have few questions here:
Is it intended to have this linker-inconsistent behavior for same nuget package but different targets frameworks?
Why this LinkerSafe attribute applied at all, if in fact it is not safe in a very basic scenario? I mean I have "SDK only" linker option and I do expect doing nothing extra (configuring proguard rules) for non sdk libraries.
I was not able to find xamarin.android documentation for LinkerSafe attribute, but for iOS counterpart it says following:
Use this attribute in your assembly if it is safe to perform linking on it, regardless of the user default setting to "Link only Framework Assemblies.
The use case for this attribute are third-party libraries that are safe to be linked because they have either safe to be linked because they do not depend on members or methods to be compiled in to work, or if they do, they used the PreserveAttribute to preserve those classes.