For a college course, I am required to use a Google Drive folder as my project location. The problem is that Google Drive makes my hidden OS X Icon files appear.
When I
This is happening because you've set the icon for the folder to something besides the default. Here's an example where I've changed only the drawables icon:
Setting a custom icon is what creates the Icon file. (It's normally hidden in Finder.)
To fix this, the easiest thing would be to reset the icon back to the default. To do that, in Finder, right click on the folder and select "Get Info". This will bring up the info window. Select the folder icon in the upper left by clicking on it, then in the top bar menu do Edit -> Cut. Here's an image to show the info window with the icon selected:
That should reset the icon and fix your problem.
Another approach is to clean out all the icons under a specific folder. On the command line, change directories to the top level folder. Then run find . -name Icon\* -delete
. Note this will delete any file starting with the work Icon. To test what files will be deleted, you can first run find . -name Icon\*
by itself to get a list.
It may be that an unknown application is updating the icons (see comments). The command line listed above can be used to clean up the icons on a regular basis.
These are the solutions we developed, based on Hod's answer.
Getting rid of all current Icon
files
find . -name Icon\*
find . -name Icon\* -delete
Automatically removing future Icon
files
Icon
files every minute:
(crontab -l 2>/dev/null; echo "*/1 * * * * find . -name Icon\* -delete") | crontab -
To undo, enter the following incantation (adapted from https://askubuntu.com/a/719877/43296) in a terminal window (in any folder):
crontab -l | grep -v Icon | crontab -
Assumptions
All of this assumes that you have:
Icon
in your projects hierarchy that you want to keep. Icon
that you want to keep.Try excluding the files or directory or folder from being compiled. In your app build.gradle
file try to exclude those files. You can try the check these links 1 2 3