when i am trying to animate layers my blender 2.79 is showing this . the layer cannot be animated. can any one help me ?

I am guessing that you are trying to animate the visibility of layers during an animation. Since this is not possible, try grouping all the objects in a given layer (select all, then CTRL-G). Then instance these Groups in your “main” Layer (add an Empty, then under the Object tab, go to Duplication:Group), and animate the rendering of the Empty (the camera icon in the Outliner).

Ironically, just this morning I was trying to animate the visibility of a Collection in 2.82 (the Layer system replacement), and found I could not. I guess this is a feature, not a bug.