The Britain Unzipped host referenced the Xtra Factor star when speaking about his recent appearance on Celebrity Juice, saying he would rather come across as "quiet" than be mocked like Flack was on last week's episode.
"That show is difficult to be on," he told Digital Spy. "Unless you have no inhibitions like Louie Spence, you can come across as a little bit quiet.
"You want to sit there and enjoy it - but you don't want to come across as a d**k. Those shows are difficult to be on unless you're a proper nutcase. In many ways, I successfully kept under Keith Lemon's radar, which is difficult to do."
James continued: "If you're Caroline Flack, there's so much you can take the p*ss out of. That is a place I would never want to get to. You want to keep as much of your private stuff private if you can. Don't flaunt it. If you go out looking for it, it'll come back and bite you on your arse."
Flack's relationship with Styles, which ended in January, attracted criticism due to her being 15 years his senior at 32. Kerry Katona and Rebecca Ferguson were among those who commented on the couple.
In March, Flack described her romance with the singer as "the hardest thing", explaining: "Everyone had an opinion on me and Harry. I suppose they're entitled to their opinions but it was really tough."
> 'Britain Unzipped' Greg James interview: 'Celebrity life is b*llocks'