[Android] Include basic proguard file so starting Xamarin Forms project can release with proguard enabled #2709
Description
Description
The current starter Xamarin Forms Android project will not deploy as is with proguard enabled.
The minimum configuration currently required is a proguard file with the following entry
-keep class android.support.v7.widget.FitWindowsFrameLayout { *; }
-dontwarn android.support.v7.widget.FitWindowsFrameLayout
The support libraries all include proguard.txt files as part of their nuget packages so Xamarin Forms could also include the above minimum.
It is debatable whether this is useful since as a user grows an application and uses more things they are going to have to learn how to interact with proguard and modify the file. It is just the inevitable outcome of having proguard enabled.
Though having the baseline function would probably stop people from creating issues and indicating that it's a defect of Xamarin Forms
Steps to Reproduce
- Create a new Xamarin Forms Mobile App.
- Under Android options, enabled either "ProGuard"
- Set Linker to Link SDK Assemblies
- Deploy to a device.
Expected Behavior
App to launch successfully.
Actual Behavior
Crashes on launch.
Basic Information
- Version with issue: 3.0.0.446417
- Last known good version: 2.5.1.527436
- IDE: Visual Studio Enterprise 2017 v15.7.1
- Platform Target Frameworks:
- Android: 8.1
.NET Framework 4.7.2
Android SDK Platform-Tools 27.0.1
Android SDK Build-Tools 27.0.3
Proguard 6.0.3
JDK 8 Update 171
Android NDK R17