0

I use proguard with optimization enabled, but I need to exclude a class MyCarGrid from the proguard optimization process

so I have write in my proguard config file

-dontoptimize MyCarGrid{*;}

Unfortunately proguard doesn't accept this syntax and return the following error

Proguard returned with error code 1. See console
[2013-08-30 00:03:37 - MyApp] proguard.ParseException: Unknown option 'MyCarGrid' in line 76 of file 'D:\Eclipse\MyApp\proguard-project.txt',
[2013-08-30 00:03:37 - MyApp]   included from argument number 2
[2013-08-30 00:03:37 - MyApp]   at proguard.ConfigurationParser.parse(ConfigurationParser.java:217)
[2013-08-30 00:03:37 - MyApp]   at proguard.ProGuard.main(ProGuard.java:476)

How could I fix this?

1 Answer 1

1

To keep the class, its fields, and its methods (but not the actual bytecode inside the methods) from being removed, optimized, and obfuscated:

-keep class mypackage.MyCarGrid { *; }
Sign up to request clarification or add additional context in comments.

1 Comment

so the keep function is also to exclude optimization and not only obfuscation of the selected class? Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.