【问题标题】:Running a gradle clean shows a failure with ProcessLogger运行 gradle clean 显示 ProcessLogger 失败
【发布时间】:2016-10-01 02:45:35
【问题描述】:

这之前有效,最近升级了 Android SDK 和 gradle。

~/app:../gradlew clean uploadHockeyDebugToHockeyApp --stacktrace
WARNING: WARNING: Dependency commons-logging:commons-logging:1.1.1 is ignored for hockeyDebug as it may be conflicting with the internal version provided by Android.

AILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mobile:clean'.
> Unable to delete directory: /Users/quantum/app/mobile/build/intermediates/exploded-aar

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':mobile:clean'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)

我试着注释掉

//编译文件('libs/commons-io-2.4.jar')

在我的依赖项中,我得到了

UnknownServiceException: No service of type ProgressLoggerFactory available in ProjectScopeServices.

Caused by: org.gradle.internal.service.UnknownServiceException: No service of type ProgressLoggerFactory available in ProjectScopeServices.

【问题讨论】:

  • 您的项目是多项目还是单项目构建?

标签: android gradle android-gradle-plugin


【解决方案1】:

按照other similar questions 中的建议尝试自己删除build 文件夹。

为此,请先退出 Android Studio,然后导航到 /Users/quantum/app/mobile/ 目录并删除 build 文件夹。

【讨论】:

    【解决方案2】:

    您可以尝试以下方法:

    如果 Android Studio 版本为 2.0 Beta,则在更新 gradle 后,可能会出现此问题(如果您使用的是 NTFS 文件系统,则更有可能),并且似乎“即时运行”是罪魁祸首。在设置中搜索“Instant Run”并取消选中该框。

    使用此命令“gradlew clean”从终端清理项目。

    【讨论】:

    • 我使用的是最新版本的 Android Studio 2.2。 Instant Run 已禁用。
    • 你能分享你的 build.gradle 文件吗?
    猜你喜欢
    • 1970-01-01
    • 2021-07-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-13
    • 1970-01-01
    • 2023-02-25
    • 2015-05-15
    相关资源
    最近更新 更多