Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increased Android Project Size after Integrating Rive SDK #298

Open
MuhHarisPK opened this issue Aug 22, 2023 · 9 comments
Open

Increased Android Project Size after Integrating Rive SDK #298

MuhHarisPK opened this issue Aug 22, 2023 · 9 comments

Comments

@MuhHarisPK
Copy link

I am experiencing an issue with my Android project where the project size has increased significantly after integrating the Rive SDK (formerly known as Flare). Prior to integrating the Rive SDK, my project size was within an acceptable range, but after adding the SDK, the size has increased beyond expectations.

@avadhbsd
Copy link

Thanks for posting this here Haris, can you please add the numbers as well so it can be confirmed if the increase in size is expected or if it indicates any other issues.

@MuhHarisPK
Copy link
Author

MuhHarisPK commented Aug 22, 2023

yes @avadhbsd , Increased APK Size up to 12MB from the Current Size after Integrating Rive SDK.
The original APK size was 37.5 MB, and the new APK size is 50.3 MB, resulting in a size difference of 12.8 MB. This indicates a 34% increase in the current APK size. 🚀 😟

@umberto-sonnino
Copy link
Contributor

Hi @MuhHarisPK, our library is ~10.8MB in its latest iteration, but that takes into account multiple architectures which should get stripped out by Google Play when downloading the APK directly from the Play Store.
We currently support 4 different architectures, so on average the Rive library should add ~2.5MB to your final APK.

Please provide a few more details here:

  • Did you build for debug or release?
  • Which version are you currently using?
  • Could you confirm if this is a Play Store APK or one that you built locally?

@MuhHarisPK
Copy link
Author

Hi @umberto-sonnino
-> We've built the release using version 7.0.0. Is this the latest version?

Regarding another issue: I can't seem to locate the animationView.getTextRunValue("name") method for handling dynamic text in this version 7.0.0.

@umberto-sonnino
Copy link
Contributor

Hi @umberto-sonnino -> We've built the release using version 7.0.0. Is this the latest version?

Regarding another issue: I can't seem to locate the animationView.getTextRunValue("name") method for handling dynamic text in this version 7.0.0.

The latest version is 8.2.2(Sonatype link)
Anything blocking you from upgrading to that? Some Text APIs aren't available until v8

@MuhHarisPK
Copy link
Author

MuhHarisPK commented Sep 7, 2023

@umberto-sonnino no blocker, please update the doc. that's why we facing confusion about the latest version.
is version 8.2.2 stable? Is there any critical crash on this version?

@umberto-sonnino
Copy link
Contributor

@umberto-sonnino no blocker, please update the doc. that's why we facing confusion about the latest version. is version 8.2.2 stable? Is there any critical crash on this version?

You can find the latest version of the library either on Sonatype or via the GitHub repo tags, the latest stable version is the one at the top and currently it's 8.2.3.

@PhilippNowak96
Copy link

Just dropping some comment here because we also came across this recently: APK Analyzer of Android Studio tells the following numbers in a release build APK:

  • x86: 5.9 MB
  • x86_64: 5.9 MB
  • arm64-v8a: 5.3 MB
  • armeabi-v7a: 4.4 MB

We are currently using version 8.5.0.

Are these numbers expected? Since they seem to be twice as high as they should be in total (20 MB instead of 10 MB)

@rcgonzalezf
Copy link

This is still an issue with the latest SDK, it will be great if Rive devs can squeeze more bytes since it impacts consumers of the library.
Just adding an idea here, that a potential solution could be to break the SDK in multiple pieces so consumers can only use what they need reducing the overall impact even with App Bundles, and release variants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants