2

In my Android project I've created an additional source-code folder called src-plugins. I added it to build.properties and building the project works fine.

However, now and then my gen folder won't regenerate and the solution is always to do an Eclipse Project > Clean.... However, this also removes the deepest sub-folder of src-plugins -- including all of its files.

Question: Is there a way to fix this?

I'll preemptively answer the most likely comment: I'm not using a subpackage because I need access to package-private class members. But I still feel I need to group these files in a separate folder.

mhelvens
  • 4,225
  • 4
  • 31
  • 55
  • 1
    I don't think it's advisable to do something like this, hence the strange behaviour you are monitoring while cleaning the project. Have you considered using a library project to seperate the two folders instead of creating two src folders in one project? – Tobrun Feb 12 '13 at 14:48
  • I hadn't considered it. I'll look into that, thanks! – mhelvens Feb 12 '13 at 17:18

2 Answers2

1

Without any logs or the layout files, activity files etc. it's even different to be reproduced, but this might be related to the same old R.java problem, when you have problems in some of the layout files. You said that it's sporadic, but you must trace what has been modified during the normal behaviour and the dissapearing of the folder. This might just be something really small and simple as that.

g00dy
  • 6,752
  • 2
  • 30
  • 43
  • The reason R.java wouldn't regenerate the last few days appears to be simple. I had `Build Automatically` turned off. Nonetheless, sometimes there's a legitimate reason to clean the project, and I'd like my extra directory not to be removed. – mhelvens Feb 12 '13 at 17:19
-1

select Build > Clean Project in your IDE or alternatively use ./gradlew clean from the console.

blubb
  • 9,510
  • 3
  • 40
  • 82
khakishoiab
  • 9,673
  • 2
  • 16
  • 22