easygcm icon indicating copy to clipboard operation
easygcm copied to clipboard

Gradle clean task fails deleting a file

Open Epholl opened this issue 9 years ago • 3 comments

After running gradlew clean, the following exception occurs:

Execution failed for task ':easygcm-tasks:clean'.

Unable to delete file: C:\dev\easygcm\easygcm-tasks\build\libs\easygcm-tasks.jar

A temporary workaround is to comment out include 'easygcm-tasks' from settings.gradle

Epholl avatar Sep 24 '15 08:09 Epholl

I suspect gradle configuration problem. After updating com.android.tools.build:gradle to 1.3.0, gradle refuses to sync with the following problem: Error:(1, 0) Your project contains 2 or more modules with the same identification eu.inloop:easygcm at ":" and ":easygcm". You must use different identification (either name or group) for each modules.

EDIT: This was a different problem: settings.gradle contained include 'easygcm' which was ambigious (could target root project as well as easygcm project) - solved by renaming easygcm module to easygcm-lib

Epholl avatar Sep 24 '15 08:09 Epholl

If I run gradlew clean from console the file does not get removed, but no lock is kept on it after execution completes. If I run gradlew clean from Android Studio, it leaves a lock on the file preventing its deletion.

Epholl avatar Sep 24 '15 14:09 Epholl

The error in gradlew clean seems to have been introduced between 9cf9048 and 90ff1b3

Epholl avatar Sep 28 '15 09:09 Epholl