Why doesn’t aniline undergo Friedel-Crafts alkylation?
The answer lies in the fact that aniline is a Lewis base and $\ce{AlCl3}$ is a Lewis acid. The reaction between aniline and $\ce{AlCl3}$ hampers the catalytic activity of $\ce{AlCl3}$ required to perform the Friedel-Crafts alkylation and acylation.

Despite the activation of the $\ce{NH2}$ group, Friedel-Crafts alkylations and acylations fail because the $\ce{NH2}$ group acts as Lewis base and interacts with the Lewis acid catalyst. ... A way to overcome this problem is to convert the $\ce{NH2}$ group into an amido group prior to Friedel-Crafts reaction. ...The amide group can be hydrolysed back to aniline group after alkylation.
(Pg. 1167 An Introduction to Organic, Inorganic and Physical Chemistry. 4th edition. Catherine E. Housecroft, Edwin C. Constable. Pearson Education Limited)

The aniline forms a Lewis acid base adduct with $\ce{AlCl3}$ :
This prevents the interaction between alkyl or acyl chloride with $\ce{AlCl3}$.