gpt4 book ai didi

android - barteksc/AndroidPdfViewer 海量 APK 大小

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:44:49 26 4
gpt4 key购买 nike

我们包括了这个 AndroidPdfViewer library支持在应用程序中查看 PDF 报告。它导致 APK 大小从 4.7Mb 大幅增加到 20.1Mb。

有没有办法减小这个尺寸。让我知道在哪里和做什么来帮助或解决这个问题。

我熟悉 proguard 并为我的应用配置它并取得了合理的成功。

最佳答案

为什么生成的 apk 这么大

documentation by barteksc/AndroidPdfViewer 中所述

Android PdfViewer depends on PdfiumAndroid, which is set of nativelibraries (almost 16 MB) for many architectures. Apk must contain allthis libraries to run on every device available on market.Fortunately, Google Play allows us to upload multiple apks, e.g. oneper every architecture. There is good article on automaticallysplitting your application into multiple apks, available here.Most important section is Improving multiple APKs creation andversionCode handling with APK Splits, but whole article is worthreading. You only need to do this in your application, no need forforking PdfiumAndroid or so.

API:https://github.com/barteksc/AndroidPdfViewer

关于android - barteksc/AndroidPdfViewer 海量 APK 大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42337133/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com