运行gradle clean会显示ProcessLogger失败

时间:2016-10-01 02:45:35

标签: android gradle android-gradle

之前有效,最近升级了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.

2 个答案:

答案 0 :(得分:0)

您可以尝试以下操作:

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

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

答案 1 :(得分:0)

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

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