无法捕获任务“:app:transformClassesWithDexBuilderForDebug”的输出文件指纹

Failed to capture fingerprint of output files for task ':app:transformClassesWithDexBuilderForDebug'

我正在尝试使用 Flutter 的壁纸包 (https://pub.dartlang.org/packages/wallpaper) 创建壁纸应用程序。问题是,当我尝试 运行 应用程序时,会出现一个错误:

Failed to capture fingerprint of output files for task ':app:transformClassesWithDexBuilderForDebug' property 'streamOutputFolder' during up-to-date check.

这是我的 dart 文件的完整代码,它试图访问 Wallpaper 包的功能:

import 'package:flutter/material.dart';
import 'package:wallpaper/wallpaper.dart';

class FullScreenImage extends StatelessWidget {

  String imgPath;
  String imgID;
  FullScreenImage(this.imgPath, this.imgID);

  final LinearGradient backgroundGradient = LinearGradient(
    colors: [Color(0x10000000), Color(0x30000000)],
    begin: Alignment.topLeft,
    end: Alignment.bottomRight,
  );

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SizedBox.expand(
        child: Container(
          decoration: BoxDecoration(
            gradient: backgroundGradient,
          ),
          child: Stack(
            children: <Widget>[
              Align(
                alignment: Alignment.center,
                child: Hero(
                  tag: imgID,
                  child: Image.network(
                    imgPath,
                    fit: BoxFit.cover,
                  ),
                ),
              ),
              Align(
                alignment: Alignment.topCenter,
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.start,
                  mainAxisSize: MainAxisSize.min,
                  children: <Widget>[
                    AppBar(
                      elevation: 8.0,
                      backgroundColor: Colors.transparent,
                      leading: IconButton(
                        icon: Icon(Icons.close),
                        onPressed: () => Navigator.of(context).pop(),
                      ),
                    )
                  ],
                ),
              ),
              Padding(
                padding: EdgeInsets.only(bottom: 4.0),
                child: Align(
                  alignment: Alignment.bottomCenter,
                  child: RaisedButton(
                    color: Colors.transparent,
                    child: Icon(
                      Icons.file_download,
                      color: Colors.white,
                      size: 30,
                    ),
                    onPressed: () async {
                      await Wallpaper.homeScreen(imgPath);
                    },
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

我想让应用程序在 android 的主屏幕上设置壁纸。但是,我收到一个奇怪的长错误。所以,这是我的控制台日志:

g lib\main.dart on QMobile Z10 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

FAILURE: Build failed with an exception.

* What went wrong:
Failed to capture fingerprint of output files for task ':app:transformClassesWithDexBuilderForDebug' property 'streamOutputFolder' during up-to-date check.
> Could not read path 'F:\Apps\querencia\build\app\intermediates\transforms\dexBuilder\debug6\com\google\firebase\analytics\connector\impl'.

* 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 1m 25s
Finished with error: Gradle task assembleDebug failed with exit code 1

我不确定原因,但重建项目解决了问题。