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

0

I am trying to create a wallpaper app using Flutter's Wallpaper package (https://pub.dartlang.org/packages/wallpaper). The thing is, when I try to run the app an error appears that says:

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

Here's the complete code of my dart file that is trying to access the Wallpaper package's functionality:

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);
                    },
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

I wanted the app to set the wallpaper on the android's Home Screen. However, I am getting a strange long error. So, here's my console log:

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\debug\146\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
android
dart
flutter
android-wallpaper
wallpapermanager
asked on Stack Overflow Apr 28, 2019 by Itzkhan

1 Answer

0

I don't know the reason for sure, but rebuilding the project solved the issue.

answered on Stack Overflow Apr 28, 2019 by Itzkhan

User contributions licensed under CC BY-SA 3.0