Problem:
After upgrading Android Studio from “Ladybug” to “Otter” I started getting the following error message when I run my app on my emulated test device:
1 "Error loading build artifacts from: .../myProjectRootDir/app/build/intermediates/apk_ide_redirect_file/productionDebug/createProductionDebugApkListingFileRedirect/redirect.txt"
Solution:
First, I ran the AGP Upgrade Assistant, which updated 2 files:
.../myProjectRootDir/gradle/wrapper/gradle-wrapper.propertiesDistribution URL has beenupgraded fromdistributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.ziptodistributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip.../myProjectRootDir/gradle/libs.versions.toml
AGP version updated fromagp = '8.8.1'toagp = '8.13.2'
And then, applied a “Run Configuration” Fix:
- Click the Edit Configurations dropdown (next to the “Play” button).
- Select your app configuration on the left.
- Scroll to the “Before Launch” section at the bottom.
- Remove “Gradle-aware Make” (select it and click the minus – button).
- Re-add it: Click +, select Gradle-aware Make, and leave the task field empty. Click OK.
- Click Apply -> OK.
- Run the app.
Additional things to try if above suggestions weren’t sufficient to fix the issue:
- Invalidate caches
- Clean the build before re-running
- Sync Gradle files