Aniline does not undergo Friedel-crafts reaction due to salt formation with aluminium chloride, the Lewis acid, which is used as a catalyst, whereas aniline is a strong base. So, an acid-base reaction will take place. Thus, aniline reacts with AlCl3 to form a salt.

Due to the positive charge on the nitrogen atom (shows −I effect and it is meta directing), electrophilic substitution in the benzene ring is deactivated. Hence, the Friedel-Crafts reaction will not take place in aniline.