Exporting Android app using ProGuard gives ParseException error

I get the following error when exporting an Android application using Proguard (via ADT from Eclipse).

"proguard.ParseException: Waiting for opening '(' or delimiter ';' before 'name'"

I see that other ProGuard analysis error errors were resolved by updating Proguard and sdk; however, no luck here after all the updates. Has anyone seen / solved this before? Thank you in advance for your help!

Environment

ADT 22.0.1

Eclipse SDK 4.2.2

Android SDK 4.2, SDK Tools rev 22

Proguard v4.9

Console log

Proguard returns with error code 1. See console proguard.ParseException: Waiting for opening '(' or delimiter ';' before 'name' on line 155 of file '~ / project / bin / proguard.txt', included in argument No. 4 in proguard.ConfigurationParser.parseMemberSpecificationArguments (ConfigurationParser.java:966) in proguard.ConfigurationParser.parseClassSpecificationArguments (ConfigurationParser.java:729) in proguard.ConfigurationParser.parseKeepClassPerererparificationPerfermserfardarmservicePerificationPerfermservice ) in proguard.ProGuard.main (ProGuard.java:476)

Line 55 from the project

-keepclassmembers class * {* method name (...); }

proguard.cfg

-optimization covers 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -detailed -optimization! code / simplification / arithmetic ,! field /, class / merge /

-assumenosideeffects class android.util.Log {public static boolean isLoggable (java.lang.String, int); public static int v (...); public static int d (...); }

-printmapping out.map

-renamesourcefileattribute SourceFile -keepattributes SourceFile, LineNumberTable

-keep public class * extends android.app.Activity -keep public class * extends android.app.Application -keep public class * extends android.app.Service -keep public class * extends android.content.BroadcastReceiver -keep public class * extends android.content.ContentProvider -keep public class * extends android.app.backup.BackupAgentHelper -keep public class * extends android.preference.Preference -keep public class com.android.vending.licensing.ILicensingService

-keepclasseswithmembernames class * {native; }

-keepclasseswithmembernames class * {public (android.content.Context, android.util.AttributeSet); }

-keepclasseswithmembernames class * {public (android.content.Context, android.util.AttributeSet, int); }

-keepclassmembers enum * {public static * [] values ​​(); public static * valueOf (java.lang.String); }

-keep class * implements android.os.Parcelable {public static final android.os.Parcelable $ Creator *; }

-keepclassmembers class * extends android.content.Context {public void * (android.view.View); public void * (android.view.MenuItem); }

-keepclassmembers class * .R $ {public static; }

+6
source share
1 answer

I think the problem could be:

-keepclasseswithmembernames class * {native; }

you can try:

-keepclasseswithmembernames class * { native <methods>; } 
+1
source

Source: https://habr.com/ru/post/949167/


All Articles