Proguard problem

Proguard problem
0.0 0


Are there any guides or specific steps required to get Proguard working with Cocos2d-x?

I have been looking around but can’t seem to get it to work. Am I supposed to configure Proguard to keep all org.cocos2dx.lib.?
Got it working with:
-keepclassmembers public class org.cocos2dx.lib.

But is that the correct way to do it?

Android size of is 4.9 MB

I want to thank you, I released my application and it would go straight to a black screen and I found out it was caused by Proguard. After a bit of Googling I found your post and fixed my game :slight_smile:


hello Robert,

congratulations for your application and thanks for suggest about Proguard

I would like to ask you a question as you use InApp Billing

I would use Proguard in my app, I use BillingLibary from robotmedia and if I try to enable proguard in my I receive some error from robotmedia library (it seems)

I use default setting:

I tried to enable Proguard also in BillingLibrary project but the error happens again

So I ask you, Do you use BillingLibrary by RobotMedia in your app?

How did you configure Proguard?



Hey Don,

Yea I used BillingLibrary from RobotMedia. Here is the Proguard config I am using. (Just remove the things you don’t need)
Hope it helps!


Thank you very much for code i m really need it.
And guys if you want to log ndk stack remote then please go to

Thank you.


For cocos2d-x version 3.4, the following seemed to fix my issues:

# cocos2d-x 3.4 exceptions:
-keepclassmembers public class org.cocos2dx.lib.** {

# more cocos2d-x 3.4 exceptions:
-keepclassmembers public class com.chukong.cocosplay.client.** {

You can add them to your project’s local proguard file.