Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] fix .aab deploying to different ABIs (#…
…6658) Fixes: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1447873 The following breaks in both Xamarin.Android & .NET 6: 1. Deploy a build with `AndroidPackageFormat=aab` to a device 2. Switch the dropdown in the IDE, deploy to an emulator Fails with: HelloWorld.csproj → Install Target _DeployAppBundle Task InstallApkSet Error [BT Missing APKs for [ABI] dimensions in the module 'base' for the provided device. I could reproduce this in a test with a blank `$(AdbTarget)`, then set `$(AdbTarget)` to the connected device. This should simulate what happens in the IDE when you switch devices. What happens is this `Condition`: Condition="!Exists('$(_ApkSetIntermediate)')" Just skips if the file exists! To solve the issue: 1. Move the `<BuildApkSet/>` task to a new `_BuildApkSet` target. 2. Add `Inputs` of `build.props`, `adb.props`, and `$(_AppBundleIntermediate)`. 3. Add `Outputs` for `$(_ApkSetIntermediate)`. 4. Add `<Touch Files="$(_ApkSetIntermediate)" />`, just in case!
- Loading branch information