Fix “Error loading build artifacts” error (Android Studio after upgrade)

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:


Solution:

First, I ran the AGP Upgrade Assistant, which updated 2 files:

  • .../myProjectRootDir/gradle/wrapper/gradle-wrapper.properties
    Distribution URL has been upgraded from distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip to distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
  • .../myProjectRootDir/gradle/libs.versions.toml
    AGP version updated from agp = '8.8.1' to agp = '8.13.2'

And then, applied a “Run Configuration” Fix:

  1. Click the Edit Configurations dropdown (next to the “Play” button).
  2. Select your app configuration on the left.
  3. Scroll to the “Before Launch” section at the bottom.
  4. Remove “Gradle-aware Make” (select it and click the minus – button).
  5. Re-add it: Click +, select Gradle-aware Make, and leave the task field empty. Click OK.
  6. Click Apply -> OK.
  7. 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

Related Posts:

Posts that may be related to "Fix “Error loading build artifacts” error (Android Studio after upgrade)":

Catzie

An odd human being who happens to have a variety of ever-changing interests, but right now they are programming, making up silly song/rap lyrics, K-pop, drawing, creating unique dessert/drink flavors, obsessing about finding out how some things works, automation, anime, video games... Ran online dessert shops Cookies PH and Catzie's Cakery in her past life.

Leave a Reply

Your email address will not be published. Required fields are marked *