Magnetohydrodynamic (MHD) kink waves have been observed frequently in solar coronal flux tubes, which makes them a great tool for seismology of the solar corona. Here, the effect of viscosity is studied on the evolution of kink waves. To this aim, we solve the initial value problem for the incompressible linearized viscous MHD equations in a radially inhomogeneous flux tube in the limit of long wavelengths. Using a modal expansion technique the spatio-temporal behavior of the perturbations is obtained. We confirm that for large Reynolds numbers representative of the coronal plasma the decrement in the amplitude of the kink oscillations is due to the resonant absorption mechanism that converts the global transverse oscillation to rotational motions in the inhomogeneous layer of the flux tube. We show that viscosity suppresses the rate of phase mixing of the perturbations in the inhomogeneous region of the flux tube and prevents the continuous building up of small scales in the system once a sufficiently small scale is reached. The viscous dissipation function is calculated to investigate plasma heating by viscosity in the inhomogeneous layer of the flux tube. For Reynolds numbers of the order of 106–108, the energy of the kink wave is transformed into heat in two to eight periods of the kink oscillation. For larger and more realistic Reynolds numbers, heating happens, predominantly, after the global kink oscillation is damped, and no significant heating occurs during the observable transverse motion of the flux tube.