question

aehrlich avatar image
aehrlich asked Jeffrey Blattman edited

Should we avoid minifying the APK unless necessary?

Should we avoid setting "minifyEnabled true" on our Clover apps unless we have to?

I analyzed minified and not-minified APKs. The minified APK appeared to be missing significant numbers of classes from the Clover SDK. The not-minified version appeared to have the entire Clover SDK within it.

I was also able to hit a bug where a custom tender payment flow hit a ClassNotFoundException for the Order class in Clover SDK. I have some users experiencing a mysterious crash using the minified APK and that might be the cause.

From the Android documentation:

"However, when you create a new project using Android Studio, shrinking, obfuscation, and code optimization is not enabled by default. That’s because these compile-time optimizations increase the build time of your project and might introduce bugs if you do not sufficiently customize which code to keep."

Clover Android SDK
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Jeffrey Blattman avatar image
Jeffrey Blattman answered Jeffrey Blattman edited
Should we avoid setting "minifyEnabled true" on our Clover apps unless we have to?

No, you should not avoid it. The quote from the Android docs is accurate, especially the part you link. If you aren't ready to manage that turning off minify is an option. It will increase download time and data usage for merchants. The severity of that depends on how big your app is to begin with.

It's hard to comment on your problem without more details. It could be an issue with our library's rules, or a problem with your app's rules.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community