Andreev levels in a single-channel conductor