![]() You can specify all fields or methods with a wildcard " * ". You probably want to specify one or more fields or methods, as usual between curly braces. This way, the option simply won't have any effect. Note: the configuration doesn't specify which class members to keep for class '.' Your configuration contains a -keepclassmembers/ -keepclasseswithmembers option to preserve fields or methods in the given class, but it doesn't specify which fields or methods. You can switch off these notes by specifying the -dontnote option. ProGuard always leaves underlying libraries unchanged. However, you don't need to keep any library classes. Note: the configuration explicitly specifies '.' to keep library class '.' Your configuration contains a -keep option to preserve the given library class. You can automatically keep such descriptor classes with the -keep option modifier includedescriptorclasses ( -keep,includedescriptorclasses. The method might then become unfindable as an entry point, e.g. Otherwise, ProGuard will obfuscate its name, thus changing the method's signature. Note: the configuration keeps the entry point '.', but not the descriptor class '.' Your configuration contains a -keep option to preserve the given method (or field), but no -keep option for the given class that is an argument type or return type in the method's descriptor. Notably, you should make sure that you always specify fully-qualified names, not forgetting the package names. You should check whether the name is correct. Note: the configuration refers to the unknown class '.' Your configuration refers to the name of a class that is not present in the program jars or library jars. If you're sure the attributes are not necessary, you can switch off these notes by specifying the -dontnote option. In a summary in the log, ProGuard provides a suggested configuration, like -keepattributes *Annotation*. The attributes contain information about annotations, enclosing classes, enclosing methods, etc. You then generally need to preserve optional class file attributes, which ProGuard removes by default. calls 'Class.get.', 'Field.get.', or 'Method.get.' Your code uses reflection to access metadata from the code, with an invocation like " class.getAnnotations()". ![]() ![]() It does list possible candidates, for your information. Otherwise, ProGuard might remove or obfuscate the class members, since it can't know which ones they are exactly. Depending on your application, you may need to figure out where the mentioned class members are defined and keep them with an option like " -keep class M圜lass ". accesses a field/method '.' dynamically Your code uses reflection to find a fields or a method, with a construct like ". Depending on your application, you may need to keep the mentioned classes with an option like " -keep class M圜lass", or their implementations with an option like " -keep class * implements M圜lass". calls '(.)Class.forName(variable).newInstance()' Your code uses reflection to dynamically create class instances, with a construct like " (M圜lass)Class.forName(variable).newInstance()". You should consider adding the jar that contains this class. ProGuard can't find a class or interface that your code is accessing by means of introspection. ProGuard may print out some notes and non-fatal warnings: Note: can't find dynamically referenced class. Whenever you don't find the solution for your issue on this page, the Guardsquare Community might be the place to check for an answer or post a question.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |