2016-10-01 107 views
2

這個工作之前,最近升級了Android SDK & gradle。運行gradle clean顯示ProcessLogger失敗

~/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) 

我試着註釋掉

//編譯文件( '庫/公地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. 
+0

您的項目是多項目還是單項目構建? –

回答

0

嘗試自己刪除build文件夾,如othersimilarquestions中所示。

要做到這一點首先退出Android Studio,然後導航到/Users/quantum/app/mobile/目錄並刪除build文件夾。

0

你可以嘗試以下操作:

如果Android Studio版本爲2.0 Beta,則更新gradle後,可能會出現此問題(更多如果你正在使用NTFS文件系統的話,可能會出現這種情況),看起來「即時運行」是罪魁禍首。在設置中搜索「即時運行」並取消選中該框。

使用此命令'gradlew clean'從終端清理項目。

+0

我是Android Studio 2.2的最新版本。即時運行已禁用。 – quantumpotato

+0

你可以分享你的build.gradle文件嗎? –