A method for making coated contact lenses, comprising the steps of: obtaining a contact lens precursor which has a posterior concave surface and an opposite anterior convex surface and comprises a lens bulk material and first reactive functional groups on and/or near the anterior and posterior surfaces, wherein the first reactive functional groups are selected from the group consisting of carboxyl groups, amino groups, azetidnium groups, epoxide groups, aziridine groups, vinylsulfone groups, thiol groups, and combinations thereof, wherein the lens bulk material is a layer that has a 3-dimensional shape of a contact lens and includes a central curved plane which divides the contact lens into two parts, one containing the anterior surface and the other containing the posterior surface and has a variable thickness; immersing the contact lens precursor in an aqueous solution in a container, wherein the aqueous solution has a room temperature and comprises (a) at least one hydrophilic polymeric material and (b) a pH-buffering system for maintaining pH of the aqueous solution, wherein the pH-buffering system comprises at least two buffering agents, wherein the total concentration of all buffering agents present in the aqueous solution is from about 10 mol/m 3 (10 mM) to 100 mol/m3 (100 mM), wherein the aqueous solution has a room temperature and a pH of from about 6.8 to about 7.5, wherein the totally concentration of all ions present in the aqueous solution is less than 241 mol/m3 (241 mM) provided that the total concentration of all ions each having two or more charges in the aqueous solution is less than 80 mol/m3 (80 mM), wherein said at least one hydrophilic polymeric material comprises second reactive functional groups each of which is capable of reacting with one first reactive functional group at a temperature above the room temperature to form a covalent linkage, wherein the second reactive functional groups are selected from the group consisting of carboxyl groups, amino groups, azetidnium groups, epoxide groups, aziridine groups, thiol groups, and combinations thereof; and heating the aqueous solution with the contact lens precursor therein to a crosslinking-temperature of from about 50°C to about 140°C and then maintaining the crosslinking temperature for at least about 20 minutes to form a coated contact lens having a hydrogel coating thereon. obtaining a contact lens precursor which has a posterior concave surface and an opposite anterior convex surface and comprises a lens bulk material and first reactive functional groups on and/or near the anterior and posterior surfaces, wherein the first reactive functional groups are selected from the group consisting of carboxyl groups, amino groups, azetidnium groups, epoxide groups, aziridine groups, vinylsulfone groups, thiol groups, and combinations thereof, wherein the lens bulk material is a layer that has a 3-dimensional shape of a contact lens and includes a central curved plane which divides the contact lens into two parts, one containing the anterior surface and the other containing the posterior surface and has a variable thickness; immersing the contact lens precursor in an aqueous solution in a container, wherein the aqueous solution has a room temperature and comprises (a) at least one hydrophilic polymeric material and (b) a pH-buffering system for maintaining pH of the aqueous solution, wherein the pH-buffering system comprises at least two buffering agents, wherein the total concentration of all buffering agents present in the aqueous solution is from about 10 mol/m 3 (10 mM) to 100 mol/m3 (100 mM), wherein the aqueous solution has a room temperature and a pH of from about 6.8 to about 7.5, wherein the totally concentration of all ions present in the aqueous solution is less than 241 mol/m3 (241 mM) provided that the total concentration of all ions each having two or more charges in the aqueous solution is less than 80 mol/m3 (80 mM), wherein said at least one hydrophilic polymeric material comprises second reactive functional groups each of which is capable of reacting with one first reactive functional group at a temperature above the room temperature to form a covalent linkage, wherein the second reactive functional groups are selected from the group consisting of carboxyl groups, amino groups, azetidnium groups, epoxide groups, aziridine groups, thiol groups, and combinations thereof; and heating the aqueous solution with the contact lens precursor therein to a crosslinking-temperature of from about 50°C to about 140°C and then maintaining the crosslinking temperature for at least about 20 minutes to form a coated contact lens having a hydrogel coating thereon.