Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio : Missing Strip Tool

I am constantly getting this warning while building my android studio code using terminal command gradle clean assembleRelease:

Unable to strip library 'lib.so' due to missing strip tool for ABI 'ARMEABI'. Packaging it as is.

Please help me on how to get this warning resolved.

Note: I know this won't affect the behaviour of my app, but my APK is too bulky and this will surely help me reduce APK size. So I need this resolved.

like image 580
Sanket B Avatar asked Nov 22 '18 20:11

Sanket B


2 Answers

The default installed NDK doesn't seem to have the tools required to strip binaries that have been built with ARMEABI support, so it ends up packaging the whole library, which increases the built file size substantially.

I've found that installing the "NDK (Side by side)" tool from Android Studio -> Tools -> SDK Manager -> SDK Tools takes care of this warning and also reduces the built APK size, especially for React Native projects.

like image 72
Dhiraj Gupta Avatar answered Sep 19 '22 21:09

Dhiraj Gupta


You can try using the following configuration in app/build.gradle.

android {         packagingOptions {         // exclude ARMEABI native so file, ARMEABI has been removed in NDK r17.         exclude "lib/armeabi/**"     } } 

Remove (or make optional) MIPS native library #3504
Android-ABIs

like image 31
user7229569 Avatar answered Sep 17 '22 21:09

user7229569