Android APK大小太大

Android APK大小太大,android,visual-studio,xamarin.forms,deployment,filesize,Android,Visual Studio,Xamarin.forms,Deployment,Filesize,我已经写完了我的应用程序,我想在生产服务器上部署它,我发现APK的大小太大了。它需要90MB,我不认为这是一件好事。在只设置SDK程序集的链接选项后,它减少到85MB,这也不好。请告诉我如何将APK大小减小到最大40MB甚至30MB?以下是一些可以尝试减小APK大小的解决方案 1.Compress your drawables ( You can find many websites to compress images without quality change). 2.Remove r

我已经写完了我的应用程序,我想在生产服务器上部署它,我发现APK的大小太大了。它需要90MB,我不认为这是一件好事。在只设置SDK程序集的链接选项后,它减少到85MB,这也不好。请告诉我如何将APK大小减小到最大40MB甚至30MB?

以下是一些可以尝试减小APK大小的解决方案

 1.Compress your drawables ( You can find many websites to compress images without quality change).
 2.Remove redundant assests and files.
 3.GOTO Analyse-->Inspect Code-->Whole project. It will scan your
 code,you can try to optimise it by No warnings and 0 erors.
 4.Remove unused dependencies in gradle.

检查我的博客这里是一个很好的参考。你应该取消选中使用共享运行时,并启用Android选项中的开发人员检测。还可以设置仅链接到Sdk程序集