Thin layer of air between lenses in contact consider the following case for thin lenses
Case 1: lens between two different medium

applying refraction through curved surfaces two times and subtracting -
$$\frac{\mu_{oil}}v - \frac{\mu_{air}}u = \frac{\mu_{L} - \mu_{air}}R - \frac{\mu_{L} - \mu_{oil}}R $$
(note if both sides are air, the lens maker's formula can be derived from above)
Case 1: lens between two different medium

in this situation in most books a thin layer of air is assumed between lenses, and even $\frac1{f_{eq.}} =\frac1{f_{1}} + \frac1{f_{2}} $ is applicable only if thin layer of air is assumed.
Why thin layer of air is considered between lenses and refraction is considered as air to lens insetead of lens1 to lens2?
 A: A thin layer of air (or any other medium for that matter) will have no impact on ray trajectories, image locations or image shapes, as long as (1) the layer is sufficiently thin, and (2) the radii of curvature on both sides of this layer are the same (meaning the layer has the same thickness throughout). When we speak of inserting a thin layer of air between a pair of lenses in direct contact, condition 2 is naturally satisfied because the curvatures of the two lenses in contact with each other are the same. You can verify for yourself by doing the math that a pair of lenses will behave the same way with or without such a layer of air. Sometimes lenses are assumed to be surrounded by air (with the understanding that internal layers of air make no difference) to simplify the analysis, because the lensmaker's equation requires lenses to be surrounded by air.
A simple example might help. Recall the lensmaker's equation:
$$\frac 1 f= (n-1)\left[\frac 1 R_1 - \frac 1 R_2 + \frac{(n-1)d}{nR_1R_2}\right].$$
Note that if (1) $d\ll R_1$ and $d\ll R_2$ (the glass is thin), and (2) $R_1 = R_2$ (the glass has the same curvature on both sides), $f$ will be infinite, meaning the lens will have no effect on ray trajectories. The same is true for a layer of air sandwiched between two pieces of glass.
Note: a thin layer will in general impact light transmission, and hence it will influence the brightness of images, and might also cause flares or other artifacts due to internal reflections.
