No; Harvard recommends 4 years of a single foreign language. They do not specify that is should be AP. Given that many schools, including elite private schools, no longer offer AP courses, it’s not surprising that applicants get admitted without any/many AP classes.
That said, there is much more to your application than just your schedule.