Android的NDK。减少APK的大小 [英] Android NDK. Decrease size of APK

查看:188
本文介绍了Android的NDK。减少APK的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编为Android应用程序,采用Android NDK。我有两个项目。首先 - 是NDK库和JNI文件夹中的库。其次 - 是我工作的应用程序,其中包括第一个项目作为库。我的应用程序的大小是太大为我(30MB)。我想减少它。我阅读教程,但他们告诉做基本的选项,如删除日志和未使用的code等但这并不能帮助我。我可以删除JNI文件夹都是我的 .C 文件(如果我在最终版本正确的,他们是不必要的,因为它们被编译成 的的.so库),或这并不减少的apk的大小?或者可能是我应该做点别的?谢谢你的兴趣我的问题!

I compiled an application for Android, using Android NDK. And I have two projects. First - is a library with ndk libs and jni folder. Second - is my working application which includes first project as a library. The size of my app is too big as for me (30Mb). And i want decrease it. I read tutorials, but they tell to do basic options, such as deleting logs and unused code, etc. But this doesn't help me. Can I delete jni folder with all my .c files (if i am correct in final build they are unnecessary, because they are compiled into .so libs), or this doesn't decreases the size of apk? Or may be i should do something else? Thank you for interest to my question!

推荐答案

如果你的 Application.mk 的行

APP_ABIS = all

或类似的,可考虑单独出货的APK为不同的平台(armeabi,armeabi-V7A,X86,MIPS)。

or similar, consider shipping separate APKs for different platforms (armeabi, armeabi-v7a, x86, mips).

的技术细节在 <一个详细讨论href=\"http://stackoverflow.com/questions/19954156/android-build-separate-apks-for-different-processor-architectures\">Android - 构建不同的处理器架构单独的APK

The technical details are discussed at length in Android - build separate APKs for different processor architectures

这篇关于Android的NDK。减少APK的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆