The item “.VolumeIcon.icns” can’t be replaced because it’s invisible I am trying to install an app in OSX.  But I am getting the below error 


  The item “.VolumeIcon.icns” can’t be replaced because it’s invisible.


When I get into the Applications, I'm able to see .VolumeIcon.icns as a hidden item.  I also tried deleting it, however it is again created by the app(by default it is hidden).  Can you guide me how to resolve this error?
I have gotten this error when trying to delete or affect an invisible file before. Temporarily turning the file visible usually, in my experience, changes the error to a dialog that asks if you are sure you would like to change the file.
I figure you have probably already come across this command, but for completeness, here is the explanation:

To make invisible files visible, enter this code in terminal:

defaults write com.apple.finder AppleShowAllFiles TRUE &amp;&amp; killall Finder


and to make invisible files invisible again:

defaults write com.apple.finder AppleShowAllFiles FALSE &amp;&amp; killall Finder


Note that this does close finder, so make sure you don't have any important folders open. I believe that it opens previously opened windows, but the back button doesn't work in my experience.

What's happening

defaults


This is OSX's command to change defaults, apple's low-level preference system.

write


This tells defaults you want to change a preference, or write it

com.apple.finder


This tells defaults that the application's preferences you want to change is Finder, specified by the application's bundle identifier.

AppleShowAllFiles


This specifies which preference you want to change within the application.

TRUE or FALSE

This is the value you want to set the preference to. In this case, it is a boolean, so the values must be TRUE or FALSE. I think you might be able to use YES or NO, but I'm not sure.

&amp;&amp;


This is a terminal operator to run whatever's after this if the previous command is successful

killall


I don't know much about this, but it kills processes or closes applications

Finder


Specifies which process or application to close.