Skip to content

.NET Android Release Build( AAB) does not honor AndroidBundleConfigurationFile #10097

@cgrant78

Description

@cgrant78

Android framework version

net8.0-android

Affected platform version

VS 2022

Description

When setting the .NET MSBuild property 'AndroidBundleConfigurationFile' to a custom BundConfig.json file, the build process does not use the custom file. Inspection of the build log shows the bundletool using a temp file ( assuming some default build generated file) for the --config options instead of the file specified via the AndroidBundleConfigurationFile property.
Initially I thought this issue was caused by Uno SDK build configuration, but I create a simple .NET MAUI app using the default template and the behavior is the same. The side-effect of this is that the app binaries are not getting extracted. I've seen a few Issues that claim to have this resolved, but I don't see how. Using the system loader to load the shared object will always work, using any other means, ex fopen etc will fail.

Steps to Reproduce

MauiApp1.zip

Extract the attached zip file content, build and deploy the Android Release configuration to an emulator or device. Observe the Deploy target does not use the custom BundleConfig.json.

Did you find any workaround?

No.

Relevant log output

Skipping target "_ManifestMerger" because all output files are up-to-date with respect to the input files.
Skipping target "_ConvertCustomView" because all output files are up-to-date with respect to the input files.
Skipping target "_AddStaticResources" because all output files are up-to-date with respect to the input files.
Skipping target "_GeneratePackageManagerJava" because all output files are up-to-date with respect to the input files.
Skipping target "_GenerateAndroidAssetsDir" because all output files are up-to-date with respect to the input files.
Touching "E:\dev\camtastik\Camtastik\_build\Camtastik\Release\net8.0-android\android\bin\packaged_resources".
Skipping target "_CompileJava" because all output files are up-to-date with respect to the input files.
Skipping target "_CompileNativeAssemblySources" because all output files are up-to-date with respect to the input files.
Skipping target "_CreateApplicationSharedLibraries" because all output files are up-to-date with respect to the input files.
Skipping target "_CompileToDalvik" because all output files are up-to-date with respect to the input files.
C:\Program Files (x86)\Android\openjdk\jdk-17.0.12\bin\java.exe -Xmx1G -jar "C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.147\tools\bundletool.jar" build-bundle --modules E:\dev\camtastik\Camtastik\_build\Camtastik\Release\net8.0-android\android\bin\base.zip --output E:\dev\camtastik\Camtastik\_build\Camtastik\Release\net8.0-android\android\bin\com.atlasmultimedia.Camtastik.aab --config C:\Users\cgrant1\AppData\Local\Temp\tmpCE12.tmp --metadata-file=com.android.tools.build.obfuscation/proguard.map:E:\dev\camtastik\Camtastik\_build\Release\net8.0-android\mapping.txt

Metadata

Metadata

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.need-attentionA xamarin-android contributor needs to review

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions