How to reduce the app size while using the io.card module in paypal sdk


If you are using the PayPal SDK and want to make the standard payment, simply you have to write this compiled code in your build.gradle,

After that, if you noticed the size of the app(.apk) increases twice or thrice(approx 10 -12mb increased).


What is the reason behind it? 

> io.card module is the reason.

If you have simply excluded this io.card module from the PayPal SDK:

the app size will be reduced.

But there is one problem to exclude this module, You will not make the payment by your debit/credit card.
There is two option to make payment by card,

And the main reason behind increasing the app size is the First option, automatically card scanner.

So what will have to do?

We have to exclude only the automatically card scanner option from the app.
So we have to add packagingOptions where we have to exclude the card scanner related files which have included the .so file instead of the whole io.card module.

In the build.gradle,

paste above file parallels to defaultConfig. After this app size will be reduce and you can also use the  direct card payment option.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.


We've bought a Shopware Extension which is a hybrid App, which we can now offer in the Google Play Store and the IOS App Store. I'am still impressed how fast and how sharp the support team leads us through every process of the App-Store clarification. Very fast and useful response.

Markus Walter

Markus Walter

Founder, Das Apartment Living

Talk to Sales


Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home