Reputation: 6518
I am getting "Failed to create BuildConfig class" error while cleaning android project in eclipse. I have recently installed Eclipse Juno for Mobile developers and while I was trying to import my existing android applications, Eclipse started giving me this kind of error.
Eclipse is working fine If I create new android projects. What could be the possible cause and probable solution for this issue?
I am using OS - Windows Server 2008
Upvotes: 9
Views: 8656
Reputation: 1
I had similar issue with Windows 10 and Eclipse. It occurred in the middle of session between two builds. I tried restarting Eclipse, tried in vain to change permissions but nothing helped.
I finally rebooted my laptop and problem was gone.
Upvotes: 0
Reputation: 2585
I had this problem when opening a copy of project that had previously been under source control, and the
\gen\{com\foo\namespace}\BuildConfig.java
file was read only.
Unchecking the read only flag on the BuildConfig.java
did the trick for me.
Upvotes: 0
Reputation: 1
This has never happened to me. I tried to import an old workspace in a Juno Eclipse for Mobile and it was ok. I also tried to import only an old android project, and it had no errors. Which ADT version are you using?
I also found an issue related to 9-patch, maybe it was your case.
Upvotes: 0
Reputation: 126
I had the error after updating (installing) Juno and letting it migrate my workspace and local git repo. Before that error I got another error:
JavaBuilder handling ImageBuilderInternalException while building: <projectname>
Finally I found out that the error was caused by file perms and the problem resolved after resetting them:
chown <me>:<me> <my-repo>
The reason behind the broken permissions: during the process of installing the MOTODEV plugins to Eclipse JUNO I had to start my Eclipse with 'sudo'. Obviously that run overwrote some of my files during the automatic build.
Upvotes: 11