Android Studio 編譯失敗 - Error loading build artifacts
前幾天在公司專案遇到一個奇怪的 Bug,這裡筆記一下解決過程。 問題描述 在 Android Studio 點選 Run 'app' 時,專案完全沒編譯就直接報錯,錯誤訊息如下: 1 Error loading build artifacts from: D:\Daniel\Projects\cropssurvey-mk2-android\app\build\intermediates\apk_ide_redirect_file\debug\createDebugApkListingFileRedirect\redirect.txt 環境資訊 我的 Android Studio 設定參數如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 Android Studio Meerkat Feature Drop | 2024.3.2 Patch 1 Build #AI-243.26053.27.2432.13536105, built on May 22, 2025 Runtime version: 21.0.6+-13368085-b895.109 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Toolkit: sun.awt.windows.WToolkit Windows 11.0 GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation Memory: 4096M Cores: 16 Registry: debugger.new.tool.window.layout=true ide.experimental.ui=true Non-Bundled Plugins: one.util.ideaplugin.screenshoter (1.8.1) com.wzc.sw.plugin (1.3.3) Dart (243.26753.1) com.duke.screenmatch (3.2) idea.plugin.protoeditor (243.22562.13) com.developerphil.adbidea (1.6.19) com.godwin.kdocer (1.6) org.sonarlint.idea (10.27.0.81781) io.flutter (86.0.1) 嘗試過的解法(失敗) Sync Project with Gradle Files Rebuild Project Invalid Cache and Restart 重開 Android Studio 刪除 /.gradle 與 /.idea 兩個資料夾。參考來源 結果,以上方法,都 沒 有 用 … ...