question

MathanKumarM-6033 avatar image
0 Votes"
MathanKumarM-6033 asked RobCaplan edited

Invalid ProGuard configuration file. Unknown option '-if' in line 16

Hi ,

I am new to Xamarin Development. While i build xamarin application i get the following error.

Invalid ProGuard configuration file. Unknown option '-if' in line 16 of file 'C:\Users\LENOVO.nuget\packages\xamarin.androidx.fragment\1.2.5.4\buildTransitive\monoandroid90....\proguard\proguard.txt', included from argument number 26 at proguard.ConfigurationParser.parse(ConfigurationParser.java:217) at proguard.ProGuard.main(ProGuard.java:530)Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8

I actually set the code shrinker option as proguard and Dex compiler set as d8.

I dont know the reason why i got this error. How to resolve it.

dotnet-xamarin
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Invalid ProGuard configuration file. Unknown option '-if' in line 16 of file ... I actually set the code shrinker option as proguard and Dex compiler set as d8

Hi, MathanKumarM. Someone faced the similar issue, and it's solved by change the Code Shrinker to R8. Please try to test the option on your side.

Check the link: https://github.com/xamarin/AndroidX/issues/85

1 Vote 1 ·

@JarvanZhang-MSFT Actually i set the code shrinker dex compiler as d8 but not working for me..

0 Votes 0 ·

Please check if the Android project file contains the <EnableProguard>true</EnableProguard> or <AndroidLinkTool>proguard</AndroidLinkTool> setting. If so, please remove the line code.

0 Votes 0 ·

0 Answers