-
Notifications
You must be signed in to change notification settings - Fork 545
.NET Android Release Build( AAB) does not honor AndroidBundleConfigurationFile #10097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The code merges the file you pass in with some required settings: android/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets Lines 2382 to 2396 in 6a27915
android/src/Xamarin.Android.Build.Tasks/Tasks/BuildAppBundle.cs Lines 93 to 108 in 6a27915
Can you share a There is a test checking it generally works:
|
Good to know that the fine contents is being merged in with some defaults. My assumption is base on the fact that with the attached BundleConfig.json , I am still not seeing my shared libraries getting extracted to where they should be. I've attached a binlog ( the last timestamped one in the output directory) as well as the BuildConfig.json used. |
Are you trying to control the behavior of I'm not sure if that actually is possible or not. I thought that If you make some other option in your
|
This |
That is correct.
So therein lies my confusion, as I've seen using a custom bundle configuration file propose at the solution to this problem is a few issues for this repro. Making changes to the bundle configuration file doesn't reflect, as I set it not to split along ABI, and I still see the split. Working on getting you a valid binlog |
Disregards that last binlog as, it was from a more complex app and not the one I initially attached. Here is the binlog for the attached app, building just the net8.0-android framework. |
The BundleConfig.json: {
"optimizations": {
"splits_config": {
"split_dimension": [
{
"value": "ABI",
"negate": false
}
]
},
"uncompress_native_libraries": {
"enabled": false
}
},
"compression": {
"uncompressedGlob": [
"typemap.mj",
"typemap.jm",
"assemblies/**",
"**/*.3g2",
"**/*.3gp",
"**/*.3gpp",
"**/*.3gpp2",
"**/*.aac",
"**/*.amr",
"**/*.awb",
"**/*.gif",
"**/*.imy",
"**/*.jet",
"**/*.jpeg",
"**/*.jpg",
"**/*.m4a",
"**/*.m4v",
"**/*.mid",
"**/*.midi",
"**/*.mkv",
"**/*.mp2",
"**/*.mp3",
"**/*.mp4",
"**/*.mpeg",
"**/*.mpg",
"**/*.ogg",
"**/*.png",
"**/*.rtttl",
"**/*.smf",
"**/*.wav",
"**/*.webm",
"**/*.wma",
"**/*.wmv",
"**/*.xmf",
"**/*.blob"
]
}
} This looks to be a merged combination of .NET for Android's defaults, and your input file: {
"optimizations": {
"splits_config": {
"split_dimension": [{
"value": "ABI",
"negate": false
}]
},
"uncompress_native_libraries": {
"enabled": false
}
}
} If you are asking about |
That would seem to be direction based on your finding. Thanks for looking into the issue. |
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
The text was updated successfully, but these errors were encountered: