You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android Studio更新后报错“Operation is not supported for read-only collection”求助

Android Studio Hedgehog更新后编译报错:Operation is not supported for read-only collection

我昨天将Android Studio更新至以下最新版本:

Android Studio Hedgehog | 2023.1.1
Build #AI-231.9392.1.2311.11076708, built on November 9, 2023
Runtime version: 17.0.7+0-17.0.7b1000.6-10550314 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.1.2
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Metal Rendering is ON
Registry:
    external.system.auto.import.disabled=true
    debugger.new.tool.window.layout=true
    ide.text.editor.with.preview.show.floating.toolbar=false
    ide.experimental.ui=true

Non-Bundled Plugins:
    Statistic (4.2.7)
    com.jetbrains.kmm (0.8.1(231)-23)

更新完成后,所有之前能正常运行的项目都无法编译,报错信息为:Operation is not supported for read-only collection。

为排查问题,我创建了一个测试项目,使用以下最新版本的依赖:

  • Gradle: 8.5
  • Android Gradle Plugin Version: 8.2.0
  • Jetbrains Kotlin Android: 1.9.20
  • Kotlin Compiler Extension Version: 1.5.5

我认为这些依赖版本不存在兼容性问题,但包括测试项目在内的所有项目都无法编译,且报错完全一致。我已经通过Android Studio向Google提交了该问题,但不确定是否会被处理,想了解这个问题可能的原因。

内容的提问来源于stack exchange,提问作者Mark Delphi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.04 19:25:59