减轻MobileFirst Platform导出的应用程序的重量 [英] lose weight for MobileFirst Platform exported apps

查看:89
本文介绍了减轻MobileFirst Platform导出的应用程序的重量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用IBM MobileFirst studio进行开发时,我发现在构建iOS / Android环境并生成本机项目之后,即使是空白应用程序(例如,一个非常简单的Hello World Android应用程序,它不使用任何本机功能),也会占用大小超过4Mb,远远大于真正的原生导出的Android apk文件。

While developing with IBM MobileFirst studio I've found that after building iOS/Android environment and generated native projects, even a blank app (e.g a quite simple Hello World Android app which do not use any native functionality), will take size more than 4Mb which is much larger than a real native exported Android apk file.

那么未使用可以删除的资源或我们可以做的其他事情,以便我们可以减轻最终导出的应用程序的负担吗?

So are there any unused resources that can be deleted or other things we can do so that we can lose weight in the final exported apps?

另一个细节,类。 '空白HelloWorld'apk文件中的dex 文件似乎比普通的apk文件(4Mb大小)大。

Another detail, the classes.dex file inside the 'blank HelloWorld'apk file seems larger than a common apk file (4Mb size).

推荐答案


  • 启动MFP 7.0,您现在可以缩小和连接移动环境。这意味着除了增加安全性之外,通过减少文件和文件内容的数量,它可以在某种程度上帮助应用程序的文件大小。

    • Starting MFP 7.0 you can now minify and concatenate mobile environments. This means that in addition to added security, by reducing the amount of files and contents of files, it can help - to some degree - with the filesize of the application.

      阅读有关应用程序构建设置的更多信息

      MFPF 7默认支持更多硬件架构。如果您打算使用JSONStore等功能,则需要此支持。添加此支持的文件位于您的app -\\android \\\
      ative \libs(arm64-v8a,armabi,armabi-v7a,mips,mips64,x86,x86-64)。因此,如果您知道自己没有使用JSONStore,请查看删除部分或全部这些文件是否对您有所帮助。但也要做一般的回归测试,以确保应用程序继续按要求工作。我可能错误的是这些文件的范围 - 在磁盘上添加3.4MB。

      MFPF 7 supports by default many more hardware architectures. This support is required if you intend on using features such as JSONStore and others. The files adding this support are located at your-app\android\native\libs (arm64-v8a, armabi, armabi-v7a, mips, mips64, x86, x86-64). So if you know you're not using JSONStore for example, see if removing some or all of these files helps you. But also do a regression test in general to make sure that the app continues to work as required. I could be wrong about the scope of these files - which add 3.4MB on disk.

      这篇关于减轻MobileFirst Platform导出的应用程序的重量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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