I have absolutely no issue building APK's of any build type but bundles... yeah they almost always error and it takes about 3-4 builds on average to get a bundle that I can upload to the play store. Sometimes they dont error but the .aab isn't in the build directory (the .apk and output-metadata.json is however).
On every "new" build the first try always returns this error
A problem was found with the configuration of task ':app:produceInternalTestingBundleIdeListingFile' (type 'BundleIdeModelProducerTask').
- Type 'com.android.build.gradle.internal.tasks.BundleIdeModelProducerTask' property 'finalBundleFile' specifies file '/Users/{user}/AndroidStudioProjects/{project}/app/build/outputs/apk/internalTesting/app-internalTesting.aab' which doesn't exist.
Its not wrong, the file isn't there... the awesome part is that if you are watching the directory, it appears and then disappears just as fast.
When I run the build the second time it doesn't throw this error. It appears to complete without an issue, however, the file is still missing. I checked firewall and antivirus logs which didn't return anything. Tested this again with both disabled and that didn't help either.
After a few tries the .aab will be there and I can upload it.
Any help would be greatly appreciated.
Android Studio Arctic Fox | 2020.3.1 Build #AI-203.7717.56.2031.7583922, built on July 26, 2021 Runtime version: 11.0.10+0-b96-7281165 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 11.0.1 Memory: 2048M Cores: 12
Gradle 7.0.2 w/ plugin 7.0.0