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

React Native安卓构建时Gradle临时工作区移动失败问题求助

React Native安卓构建时Gradle临时工作区移动失败问题求助

今天我尝试搭建React Native环境,结果卡在了一个Gradle相关的错误上,折腾半天没找到解决办法,来求助大家!

错误信息如下:

What went wrong:
java.io.UncheckedIOException: Could not move temporary workspace (C:\Users\nadab\carikampus\android.gradle\8.6\dependencies-accessors\423f0288fa7dffe069445ffa4b72952b4629a15a-ddd6805c-d842-4428-a232-84b5d498db8e) to immutable location (C:\Users\nadab\carikampus\android.gradle\8.6\dependencies-accessors\423f0288fa7dffe069445ffa4b72952b4629a15a)

Could not move temporary workspace (C:\Users\nadab\carikampus\android.gradle\8.6\dependencies-accessors\423f0288fa7dffe069445ffa4b72952b4629a15a-ddd6805c-d842-4428-a232-84b5d498db8e) to immutable location (C:\Users\nadab\carikampus\android.gradle\8.6\dependencies-accessors\423f0288fa7dffe069445ffa4b72952b4629a15a)

我已经用npx react-native doctor做了环境检查,所有核心依赖都显示正常:

  • ✓ Node.js - Required to execute JavaScript code
  • ✓ yarn - Required to install NPM dependencies
  • ✓ Metro - Required for bundling the JavaScript code
  • Android
    • ✓ Adb - Required to run apps on Android devices

有没有遇到过类似问题的朋友,能给点解决思路吗?

备注:内容来源于stack exchange,提问作者Nada Bilhaqi

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.04.16 09:12:57