A general approach for encapsulating organic crystals in a polyaniline shell.