安装一个N大小的APK需要多少space?

How much space do I need to install an APK of the size of N?

我查看了以下链接(实际上还有一些链接),但它们没有说明 space 我需要多少安装 N 大小的 APK。

"Insufficient storage" when trying to install new app

In Depth: Android Package Manager and Package Installer

我要安装的应用是用户应用,不是从 Google Play 下载的。我只是下载APK,保存到/data/data/com.myapp/app_,然后运行系统对话框,用户确认更新。

private void install() {
    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setDataAndType(
            Uri.fromFile(mApkSaveDir.getAbsolutePath() + File.separator + APK)),
            "application/vnd.android.package-archive"
    );
    startActivity(intent);
    finish();
}

我认为这是不可能的

A​​PK 是类似 RAR 或 ZIP 的文件

它只是压缩文件而已

解压后的大小取决于压缩的文件

可能还有资源

实际上已知的是解压后的大小会更大。通常它看起来像 1 到 3