Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

can't clean project #961

Description

when i clean project,eclipse always alert errors:

Errors occurred during the build.
Errors running builder 'Android Package Builder' on project 'FrogCare'.
Problems encountered while deleting resources.
Could not delete 'E:\Graduation-Design\FrogCare\bin\androidannotations.log'.
Problems encountered while deleting files.
Could not delete: E:\Graduation-Design\FrogCare\bin\androidannotations.log.
Problems encountered while deleting resources.
Could not delete 'E:\Graduation-Design\FrogCare\bin\androidannotations.log'.
Problems encountered while deleting files.
Could not delete: E:\Graduation-Design\FrogCare\bin\androidannotations.log.

Activity

  1. WonderCsabo commented on Apr 22, 2014

    @WonderCsabo
    Member

    This is only annoying when eclipse is open, and one executes mvn clean, it cannot run, because eclipse does not let go androidannotations.log. @DayS do you have any suggestion for this?

  2. DayS commented on Apr 22, 2014

    @DayS
    Contributor

    That's weird. I don't know why Eclipse would like to prevent you from removing this file (Especially as it's a generated file in the generated folder)...
    However, I do know that Windows sometimes keep reference in some files and lead to this kind of issues. Are you working on an Unix based computer or a Windows ?

  3. WonderCsabo commented on Apr 22, 2014

    @WonderCsabo
    Member

    Windows... I know, a Unix-based platform would make things easier, but it is a pain in the ass to switch a full built dev environment to Unix.
    However, i can test this thing on Ubuntu, if you think this is interesting.

  4. DayS commented on Apr 22, 2014

    @DayS
    Contributor

    I might be the problem... Or not.
    Did you manage to replicate this issue every time ? If so, could you try again on Ubuntu ? Just to check if this comes from the OS or not

  5. WonderCsabo commented on Apr 22, 2014

    @WonderCsabo
    Member

    Yes, i can reproduce every time on Windows. It is strange that all .java files can be deleted but not androidannotations.log. :S On Ubuntu eclipse does not produces this issue.
    I also discovered if i just open my workspace and not modify any files (so processing is not starting), i can execute mvn clean.

  6. DayS commented on Apr 22, 2014

    @DayS
    Contributor

    Maybe we have an unclosed stream somewhere... We should take a closer look on this

  7. ghost closed this as completedon Apr 24, 2014
  8. ghost reopened this on Apr 24, 2014
  9. WonderCsabo commented on Apr 24, 2014

    @WonderCsabo
    Member

    Yeah, it does not related to maven. Simply the .log file cannot be deleted on Windows, if the Annotation Processor was invoked.

  10. DayS commented on Apr 24, 2014

    @DayS
    Contributor

    That's weird because all logger appenders are closed at the end of annotation processing.

  11. WonderCsabo commented on Apr 24, 2014

    @WonderCsabo
    Member

    Yeah, i investigated the code yesterday. Maybe an eclipse indexer or something else holds on the file? Is there any way to see what handler/process/etc uses a file on Windows?

  12. WonderCsabo commented on Jun 9, 2014

    @WonderCsabo
    Member

    This is a very annoying issue. If i want to call maven clean, i have to close Eclipse. Any progress here?

  13. DayS commented on Jun 9, 2014

    @DayS
    Contributor

    I can't reproduce this issue on my own environment so it's hard to say..

  14. minhoryang commented on Jun 20, 2014

    @minhoryang

    Happen to me sometime and now it happened.
    I need to reopen Eclipse.

  15. PerfectCarl commented on Jun 20, 2014

    @PerfectCarl
    Contributor

    I can reproduce it everytime on Eclipse 3.8 (without maven or m2clipse).

    A workaround I found is to set the aa log to %TEMP%\aa.log, using the logFile configuration.

  16. WonderCsabo commented on Jun 21, 2014

    @WonderCsabo
    Member

    Thanks @PerfectCarl, nice workaround. BTW i think you meant the logFile property.

  17. WonderCsabo commented on Jun 22, 2014

    @WonderCsabo
    Member

    The problem with this method that it is polluting my maven build log with the FileNotFoundException stacktrace. @DayS can we add a log level which does not opens the appenders at all?

  18. PerfectCarl commented on Jun 22, 2014

    @PerfectCarl
    Contributor

    @WonderCsabo indeed. Corrected.

  19. WonderCsabo commented on Jul 28, 2014

    @WonderCsabo
    Member

    I played around with Process Explorer, and it seems indeed the eclipse process is holding on the file.

    @DayS what about my suggestion in my previous comment?

  20. DayS commented on Sep 21, 2014

    @DayS
    Contributor

    We CAN disable logging but the idea of the logging system was to make things easier when people have issues. So I'm not really sure if it's a good idea to allow users to do disable it. We better should fix this issue

  21. WonderCsabo commented on Sep 21, 2014

    @WonderCsabo
    Member

    I do not think we can fix this in our side, i think everything is properly closed.

  22. SurealCereal commented on Nov 23, 2014

    @SurealCereal

    I just had this issue with Android Studio 1.0RC1 on Windows 8.1 x64 with Java 1.8.0_25 x64. Java.exe was locked onto the file in project\build\generated\source\apt\androidannotations.log even after I exited Android Studio. The process was stuck and not even reporting an open file handle with Process Explorer. Anyways, this causes the build to fail. I've had it happen occasionally in the past, but I always thought it was an Eclipse problem.

  23. dodgex commented on Nov 23, 2014

    @dodgex
    Member

    can confirm that issue for Android Studio 1.0RC1. Also Windows 8.1 but Java7_71 x64.

  24. WonderCsabo commented on Nov 23, 2014

    @WonderCsabo
    Member

    Thanks guys. Can you confirm that Ubuntu/Mac does not produce this?

  25. WonderCsabo commented on Nov 23, 2014

    @WonderCsabo
    Member

    Also what happens if you just ran gradle from the command line on Windows?

  26. dodgex commented on Nov 23, 2014

    @dodgex
    Member

    command line works fine, at least if the java process die not lock the androidannotations.log. same issue as for maven.

  27. WonderCsabo commented on Dec 16, 2014

    @WonderCsabo
    Member

    Fixed by #1110.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions