—NH2 has +R effect, it donates electrons to the benzene ring. As a result, the lone pair of electron on the N-atom gets delocalized over the benzene ring and thus it is less readily available for protonation. Hence, aniline is a weaker base than cyclohexylamine.