One of my students asked me why we can't say in English "you are doing stupidly", I know that we can say you are acting stupidly (generally) or you are doing IT stupidly and I told him that doing requires an object is this explanation correct?
No, that doesn't work. It doesn't need an object to still work in these sentence:
You're doing well.
He's doing poorly.
I'm doing okay.
But I don't have a better explanation.
I'm not a teacher, but I write for a living. Please don't ask me about 2nd conditionals, but I'm a safe bet for what reads well in (American) English.
As Barb D points out, the verb 'do' can be intransitive, but essentially only when complemented by an adverb semantically equivalent to 'well' or 'badly', or to some degree of those, explaining both do poorly ('poorly' here is synonymous with 'badly') and informal do OK ('OK' here = fairly well), as well as do fantastically and do abysmally (respectively, 'extremely well' and 'extremely badly'), while excluding many others, such as *do stupidly ('stupidly', despite its negative connotations, does not actually mean 'badly') or *do happily (despite positive connotations, 'happily' does not mean 'well').
It is interesting to note, however, that some apparently disallowed collocations, such as informal BrE do uselessly, would be considered acceptable in contexts where the quality of a person's performance, e.g. in a sporting event, was being assessed (i.e. in this case, uselessly = badly).