小编col*_*666的帖子

Dotnet Maui 中的 Android 资产交付

我有一个 .NET MAUI 项目,目录中有很多资产(图像)Resources\Images,需要部署到 Google Play 商店。这意味着生成的 aab 包的大小远远超出了 Google Play 商店 150MB 的限制。(信息:Your App Bundle contains the following configurations where the initial install would exceed the maximum size of 150 MB...)

我当前的解决方案将图像大小调整为 <= 150MB。我现在看到可以为资产生成单独的文件,这称为Play Feature Delivery

这个示例项目中,我获得以下 gradle 文件来创建安装时包:

apply plugin: 'com.android.asset-pack'

assetPack {
    packName = "install_time_asset_pack" // Directory name for the asset pack
    dynamicDelivery {
        deliveryType = "install-time" // delivery mode
    }
}
Run Code Online (Sandbox Code Playgroud)

我的问题是:这可以通过 .NET MAUI 来完成吗?是否可以向 csproj 文件添加一些元素来执行此操作,就像密钥库的示例一样:

<PropertyGroup …
Run Code Online (Sandbox Code Playgroud)

android google-play google-play-console maui .net-6.0

5
推荐指数
1
解决办法
1393
查看次数