【问题标题】:Flutter failed to create parent directoryFlutter 创建父目录失败
【发布时间】:2021-07-12 01:16:27
【问题描述】:

我格式化了我的 PC 并将 Flutter sdk 位置保留在同一位置。唯一的区别是用户文件夹的名称。之前它被称为“thesl”,但现在它是“bscho”。每当我去构建我的颤振应用程序时,我都会得到这个:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Failed to create parent directory 'C:\Users\thesl' when creating directory 'C:\Users\thesl\OneDrive\dev\redlino\redlino\android\app\build\intermediates\flutter\debug\flutter_assets'

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

我的 Flutter SDK 的路径是:C:\dev\flutter

我的 Flutter 应用程序的路径(pubspec.yaml 所在的位置)是:C:\dev\redlino\redlino(是的,这两个 redlino 是故意的)

我的项目文件曾经位于 OneDrive 中,但后来我卸载了它,这也无济于事。

【问题讨论】:

    标签: android flutter gradle


    【解决方案1】:

    我通过删除 android/app 目录中的 build 文件夹解决了我的问题。

    【讨论】:

      【解决方案2】:

      在 android/app 中有 build.gradle 尝试删除它

      【讨论】:

      猜你喜欢
      • 2021-11-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-21
      • 2019-09-02
      • 1970-01-01
      • 1970-01-01
      • 2020-03-26
      相关资源
      最近更新 更多