On NativeScript 2.0 and before it I was able to manually remove the unneeded ABI builds of the NativeScript Runtime from the /platforms/android/libs/jni/ folder.
Now, with NS 2.1 I cant. I consider this is very important for us. NativeScript blog already published a post (read "Multiple APKs in NativeScript" paragraph) about that with a tutorial on doing this trick. I have use that trick to make the android apk size smaller.
How to do multiple APKs on NS 2.1?
Hi @calebeaires,
As a workaround i can suggest going into <app_name>/platforms/android/libs/runtime-libs/ opening nativescript.aar with some file archiver. Once opened, go to /jni/ folder and delete what you don't want as you did before. This will have the previous effect.
I have tried to do that, but it did not work.
tns build androidThe file is there, but is was not recognized
A problem was found with the configuration of task ':prepareExampleRuntimeUnspecifiedLibrary'.
> File '/Users/macbook/Sites/Dev/example/platforms/android/libs/runtime-libs/nativescript.aar' specified for property 'bundle' does not exist.
Hi @calebeaires
There is no need to unzip and zip again, just open the nativescript.aar with winzip or 7zip, delete the files that you don't need and run the build..
I can't seem to reproduce your problem, but you can try cleaning the project, by deleting the <app_name>/platforms/android/build/ folder.
For future reference please use the template provided for creating new issues.
I did it. My error was that after all processes, the name of the file was nativescript.aar.zip. I didnt release that.
馃憤
I did it, apk size is smaller but when to publish the app, Google Play Store Developer Console dont recognize that is just one of then. I took a little screen of Play Store D. Console

Hi @calebeaires,
A solution to your problem would be:
<app_name>/app/App_Resources/Android/app.gradle android {
....
splits {
abi {
enable true //enables the ABIs split mechanism
reset() //reset the list of ABIs to be included to an empty string
include 'platform_to_include'
}
}
...
_platform_to_include_ can currently be: arm64-v8a, armeabi-v7a or x86
- run
tns run android
Read more here
Please share if this solution works for you.
It works like a charm. I did it and manually change the versionCode on Android Manifest. I tested on real device to.
Thank you for the help @calebeaires. I'll update the "how to publish android" documentation with this information.
Most helpful comment
Hi @calebeaires,
A solution to your problem would be:
<app_name>/app/App_Resources/Android/app.gradleRead more here
Please share if this solution works for you.