Skip to content

Would you answer me about relation of agp and ndk version and .so file size. #1844

Answered by DanAlbert
ciwhiz asked this question in Q&A
Discussion options

You must be logged in to vote

As far as I know, there is no need to install NDK when building a prebuilt .so file as an apk.

There is if you want AGP to strip those libraries. llvm-strip is shipped in the NDK. If you have no NDK installed AGP cannot strip prebuilt libraries during APK packaging. If you read the warnings from your AGP build you should see this: https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:build-system/gradle-core/src/main/java/com/android/build/gradle/internal/cxx/stripping/SymbolStripExecutableFinder.kt;l=54-58;drc=58c237e7f2a2cbb89b1011a384d63a5f64195845

I (unsuccessfully) argued against this behavior, FWIW. A real user might have more luck getting it changed …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by DanAlbert
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants