The theory of muonic atoms is revisited for the hydrogenlike muonic ions, where the Lamb shift between the and levels is analyzed by including the contributions from the pure quantum electrodynamics effect, the finite nuclear size, and nuclear-structure corrections.