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

Why my aar file so large more than 100 MB ? #1008

Closed
aidenpearce001 opened this issue Aug 14, 2020 · 2 comments
Closed

Why my aar file so large more than 100 MB ? #1008

aidenpearce001 opened this issue Aug 14, 2020 · 2 comments
Assignees
Labels
platform:android Issues with Android as Platform

Comments

@aidenpearce001
Copy link

i had follow this post : https://google.github.io/mediapipe/getting_started/android_archive_library and my aar file is about 120 mb , whereas this git https://github.com/jiuqiant/mediapipe_multi_hands_tracking_aar_example/ only 52.7 MB , how can i reduce the size of my aar file(i build for only one hand tracking)

@mgyong mgyong added the platform:android Issues with Android as Platform label Aug 14, 2020
@AbhisKmr
Copy link

add this --linkopt="-s" to the command
like: bazel build -c opt --host_crosstool_top=@bazel_tools//tools/cpp:toolchain --fat_apk_cpu=arm64-v8a,armeabi-v7a --linkopt="-s" //path/to/the/aar/build/file:aar_name

@jiuqiant
Copy link
Collaborator

add this --linkopt="-s" to the command
like: bazel build -c opt --host_crosstool_top=@bazel_tools//tools/cpp:toolchain --fat_apk_cpu=arm64-v8a,armeabi-v7a --linkopt="-s" //path/to/the/aar/build/file:aar_name

Yes, stripping symbols can reduce the aar size drastically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:android Issues with Android as Platform
Projects
None yet
Development

No branches or pull requests

4 participants