Almost periodic solutions and asymptotic stability