I am getting the following error message when I enable Proguard from gradle file and to generate an release build file.
Exception while processing task java.io.IOException: proguard.ParseException: Expecting type and name instead of just '' before '(' in line 169 of file 'S:\workspace\Projects..\app\build\intermediates\proguard-rules..\release\aapt_rules.txt' at com.android.build.gradle.tasks.AndroidProGuardTask$1.run(AndroidProGuardTask.java:117) at com.android.builder.tasks.Job.runTask(Job.java:48) at com.android.build.gradle.tasks.SimpleWorkQueue$EmptyThreadContext.runTask(SimpleWorkQueue.java:41) at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:227) at java.lang.Thread.run(Thread.java:745) Error:proguard.ParseException: Expecting type and name instead of just '' before '(' in line 169 of file 'S:\workspace\Projects..\app\build\intermediates\proguard-rules..\release\aapt_rules.txt' at proguard.ConfigurationParser.parseMemberSpecificationArguments(ConfigurationParser.java:908) at proguard.ConfigurationParser.parseClassSpecificationArguments(ConfigurationParser.java:748) at proguard.ConfigurationParser.parseKeepClassSpecificationArguments(ConfigurationParser.java:534) at proguard.ConfigurationParser.parse(ConfigurationParser.java:165) at proguard.gradle.ProGuardTask.getConfiguration(ProGuardTask.java:1142) at proguard.gradle.ProGuardTask.proguard(ProGuardTask.java:1074) at com.android.build.gradle.tasks.AndroidProGuardTask.doMinification(AndroidProGuardTask.java:139) at com.android.build.gradle.tasks.AndroidProGuardTask$1.run(AndroidProGuardTask.java:115) ... 4 more Error:Execution failed for task ':app:packageProRelease'. > Unable to compute hash of S:\workspace\Projects\app\build\intermediates\classes-proguard\Pro\release\classes.jar
I am using following libraries in the code:
A weird workaround: disable minifyEnabled (minifyEnabled false), generate signed APK, and then re-enable it (minifyEnabled true) and generate the signed APK again. Hope this works.
In my case i was using a custom library that i created and i had set minifyEnabled true, and in the dependent module i again did same minifyEnabled true. keeping this at only one place solved my problem. Same can be case with libraries other than your own!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With