How to reduce and compress an apk file in android

前端 未结 4 624
没有蜡笔的小新
没有蜡笔的小新 2020-12-28 21:06

I have one apk file but its file size is 22.4 MB. It\'s huge, so I need to reduce or compress the apk file in android. What is the right way to reduce and compress the apk f

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-28 21:42

    You can ZipAlign the signed apk to compress it.

    Usage:

    zipalign [-f] [-v]  infile.apk outfile.apk
    

    Example:

    D:\android-sdk\android-sdk\tools>zipalign -f -v 4 "C:\Users\Joisar\Desktop\project_name\appname_signed.apk" "C:\Users\Joisar\Desktop\project_name\appname__zipaligned.apk"
    

    Note:

    Kindly checkout the apk whether it is zipaligned or not by following command, if it's not zipaligned, then do it.

    zipalign -c -v 4 "C:\Users\Joisar\Desktop\project_name\appname_signed.apk"
    

提交回复
热议问题