FAILURE: Build failed with an exception. * What went wrong: Could not create service of type TaskHistoryRepository using TaskExecutionServices.createTaskHistoryRepository(). > Timeout waiting to lock task history cache (/Volumes/Mac User/macbook/lab/aws/training/gradle_student_mgmt/.gradle/4.5.1/taskHistory). It is currently in use by another Gradle instance. Owner PID: unknown Our PID: 8438 Owner Operation: unknown Our operation: Lock file: /Volumes/Mac User/macbook/lab/aws/training/gradle_student_mgmt/.gradle/4.5.1/taskHistory/taskHistory.lock
一個Android Studio的專案,在 Mac Android Studio import的時候報錯如下,用搜到的方法解決無果(如洗掉鎖定檔案),錯誤始終存在,
后嘗試將該專案檔案從移動硬碟移動到本地磁盤后, 問題解決,經查閱確定是gradle的一個磁盤檔案系統格式支持的問題,
可能是ExFat檔案系統不支持檔案鎖定導致,
很多人在這里討論了這個同樣的問題,https://github.com/gradle/gradle/issues/4329

使用ExFat檔案系統是為了與windows共享,目前看來沒有什么好的解決方法,移動專案到本機硬碟打開吧,
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/433196.html
標籤:Android
