您好,我是新手,还不了解Gradle如何在 flutter 下工作。上一次代码运行很好,但是当我重新运行它时,发生了gradle错误。无论如何,我不更改任何gradle文件,我所要做的只是修改我的dart文件,并在pubspec.yaml中添加了一些插件

谢谢

我所做的事情:flutter clean

Launching lib/main.dart on LUNA V55 in debug mode...
Initializing gradle...                                              7.9s
Resolving dependencies...
* Error running Gradle:
ProcessException: Process "/Users/ngademint/Documents/firecek/firecek_mobile_backoffice/android/gradlew" exited abnormally:

> Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

> Task :app:properties

------------------------------------------------------------
Project :app
------------------------------------------------------------

INTERNAL__CHECKED_MINIMUM_PLUGIN_VERSIONS: true
allprojects: [project ':app']
android: com.android.build.gradle.internal.dsl.BaseAppModuleExtension_Decorated@69b7e7dc
androidDependencies: task ':app:androidDependencies'
ant: org.gradle.api.internal.project.DefaultAntBuilder@1dded2de
antBuilderFactory: org.gradle.api.internal.project.DefaultAntBuilderFactory@5e62e49c
archivesBaseName: app
artifacts: validateSigningProfile: task ':app:validateSigningProfile'
validateSigningRelease: task ':app:validateSigningRelease'
version: unspecified
writeDebugApplicationId: task ':app:writeDebugApplicationId'
writeProfileApplicationId: task ':app:writeProfileApplicationId'
writeReleaseApplicationId: task ':app:writeReleaseApplicationId'
1 actionable task: 1 executed


FAILURE: Build failed with an exception.

* What went wrong:
Could not update time stamp for /Users/ngademint/Documents/firecek/firecek_mobile_backoffice/android/.gradle/4.10.2/gc.properties

* 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
  Command: /Users/ngademint/Documents/firecek/firecek_mobile_backoffice/android/gradlew app:properties


Please review your Gradle project setup in the android/ folder.```

最佳答案

嗯,我只是通过删除<project>/android/.gradle/4.10.2/中的gc.properties来解决它,然后重新运行它。奇迹般有效

07-24 09:50
查看更多