关闭。这个问题需要debugging details .它目前不接受答案。
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将帮助其他人回答问题。
去年关闭。
Improve this question
当我尝试在 USB 设备上构建我的应用程序时,构建崩溃并显示此日志输出
FAILURE: Build failed with an exception.
What went wrong: Some problems were found with the configuration of task ':app:compileFlutterBuildDebug' (type 'FlutterTask').
Type 'FlutterTask' property 'assets' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
- Add an input or output annotation.
- Mark it as @Internal.
Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#missing_annotation for more details about this problem.
Type 'FlutterTask' property 'assetsDirectory' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
- Add an input or output annotation.
- Mark it as @Internal.
Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#missing_annotation for more details about this problem.
Type 'FlutterTask' property 'buildMode' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
- Add an input or output annotation.
- Mark it as @Internal.
Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#missing_annotation for more details about this problem.
Type 'FlutterTask' property 'fastStart' doesn't have a configured value.
Reason: This property isn't marked as optional and no value has been configured.
Possible solutions:
- Assign a value to 'fastStart'.
- Mark property 'fastStart' as optional.
Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#value_not_set for more details about this problem.
Type 'FlutterTask' property 'flutterExecutable' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
- Add an input or output annotation.
- Mark it as @Internal.
Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#missing_annotation for more details about this problem.
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
请帮助找到解决此问题的方法
最佳答案
发生这种情况是因为您将项目中的 gradle 更新为 gradle 7。并且 gradle 7 有一些新的注释属性,必须进行审查。
我也遇到了这个问题,并在 github 上提出了一个问题。
This is the link
所以你的选择
在引用的页面(Pull Req)中。有一段名为
Files Changed
.看到那边的绿色线条。只需编辑您的 gradle
文件和添加/编辑与绿色线条相同。
关于java - 升级 gradle 时,Flutter 项目无法构建。错误 : Type 'FlutterTask' property 'assets' is missing an input or output annotation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67137816/