This work studies the chemical stability and the changes of structure and electrical conductivity of LaNiO 3−x films under the low oxygen partial pressure (pO 2 ) atmosphere. Polycrystalline and epitaxial LaNiO 3−x films were grown on a number of substrates including Si, LaAlO 3 and SrTiO 3 by sol–gel method. A range of structural and electrical characterizations were carried out for the grown films. The results showed that the chemical stability and oxygen stoichiometry of the LaNiO 3−x films were substrate-dependent, as well as influenced by the preparation process. The compressive strain introduced by the heteroepitaxial growth helped the films to keep a higher oxygen stoichiometry and therefore showed a higher conductivity than the polycrystalline and stretched epitaxial films. The epitaxial films, in particular under the tensile strain, showed a higher stability with a slower oxygen loss rate in vacuum at high temperature.