Obfuscating libgdx jar with proguard

Hello guys.

I’m new to proguard. I’m using proguard to obfuscate my libgdx jar, I get a lot warnings when the process has ended, these are the warnings I’ve got:

Warning: there were 70415 unresolved references to classes or interfaces. You may need to add missing library jars or update their versions. If your code works fine without the missing classes, you can suppress the warnings with ‘-dontwarn’ options. (ProGuard Manual: Troubleshooting | Guardsquare) Warning: there were 68 unresolved references to program class members. Your input classes appear to be inconsistent. You may need to recompile the code. (ProGuard Manual: Troubleshooting | Guardsquare) Please correct the above warnings first.

I’ve already put the directories with the jar files for my project’s external libraries, and I’ve got the same warnings. I’ve been looking for a tutorials for a few days, but they don’t explain clearly the steps to solve the issue. Could you please help me with this?

HI @PACO_VALENZUELA ,

Welcome to the ProGuard Community!

Does your build succeed? If so, I wouldn’t worry about these notes/warnings as long as they are non-fatal and do not prevent your build from succeeding.

If you test your app and can verify it’s working as expected, you can simply suppress these warnings using the -dontnote or -dontwarn directives and then passing in the classpath for that library.

For example:
-dontnote com.facebook.**
-dontwarn com.facebook.**

Will suppress notes and warnings for the facebook library, ensuring they no longer appear in your logs.

Please let me know if anything is not clear.
Kind Regards,
Jack