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

Updated 14 December 2016


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.

Start a Project

    Message Sent!

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

    Back to Home