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

Reduce android example APK size #8932

Merged
merged 1 commit into from Jul 5, 2023

Conversation

NiklasEi
Copy link
Member

Objective

The current mobile example produces an APK of 1.5 Gb.

  • Running the example on a real device takes significant time (around one minute just to copy the file over USB to my phone).
  • Default virtual devices in Android studio run out of space after the first install. This can of course be solved/configured, but it causes unnecessary friction.
  • One impression could be, that Bevy produces bloated APKs. 1.5Gb is even double the size of debug builds for desktop examples.

Solution

  • Strip the debug symbols of the shared libraries before they are copied to the APK

APK size after this change: 200Mb
Copy time on my machine: ~8s

Considered alternative

APKs built in release mode are only 50Mb in size, but require setting up signing for the profile and compile longer.

@NiklasEi NiklasEi added C-Examples An addition or correction to our examples O-Android Specific to the Android mobile operating system labels Jun 22, 2023
@james7132 james7132 requested a review from mockersf July 5, 2023 21:56
@james7132 james7132 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jul 5, 2023
@mockersf mockersf added this pull request to the merge queue Jul 5, 2023
Merged via the queue into bevyengine:main with commit b61397e Jul 5, 2023
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Examples An addition or correction to our examples O-Android Specific to the Android mobile operating system S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants