android - 无法捕获任务“: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.
这是我尝试访问Wallpaper
包功能的 dart 文件的完整代码:
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\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
解决方案
我不确定原因,但重建项目解决了这个问题。
推荐阅读
- c# - 如何使用 LineRenderer 在游戏视图中制作弯曲的 Debug.DrawLine
- proof - 我可以从枚举表达式中提取边界证明吗?
- cookies - 无法使用主域 MVC (example.com) 和 Angular 8 应用程序 (subdomain.example.com) 单次登录
- adobe - 达到资产到期时间后,它不会被取消发布
- javascript - 当我尝试将数组的值作为选项添加到文本框中时,Datalist 未进入文本框
- java - 如何在 Apache Flink 配置仪表板中隐藏敏感配置数据?
- circuit-sdk - 问:如何在电路上水平而不是垂直显示收音机
- html - 尝试使用动态 ID 时,Bootstrap 手风琴不起作用
- rust - 如何向特定线程发送消息?
- java - 使用字符串作为输出的 Java Saxon xPath 示例