The reason many people hate the main characters...
...is not because they are racist or can't appreciate anti-heroes. There have been a lot of posts attacking people for not liking the main characters and I thought I'd add my two pence in defence of those critics.
I think the problem is that Joe Cornish has captured a subset of British society so accurately and the language, costume, setting and acting were spot-on.
The appeal of the anti-hero, such as bank robbers, hitmen, lone cowboys, is that they are at a remove from everyday life - none of us will likely ever be involved in a hold up, will ever be targeted by hitmen, or will ever be in the Wild West circa 1880. Furthermore, anti-heroes are normally never indiscriminate: bank robbers target a corrupt and morally bankrupt economic system that privileges the rich over the poor; the 'heroic' hitmen only tend to go after those who deserve it and don't attack the innocent; the gunslinger protects ordinary people and only takes on the violent. In each case, the anti-hero has a 'code' that they follow, and a cause that we can root for because it is far removed from everyday reality. And there's a vicarious thrill to seeing people do those things that we'd like to do but don't have the guts (Falling Down is a classic example).
The problem with Attack the Block's characters is that they are so real and so much a part of everyday life for those living in Britain and especially London. I think the further away you are from the reality, the better you can like the characters as anti-heroes, so Americans in particular, I have noticed, do like them. Unfortunately, when you are living in a place where gangs of feral youths make you fear for your safety when out after dark, when people are daily stabbed and shot on their doorsteps, when in the London riots last year the youth of our nation went on a vile and destructive crime spree that left a bitter taste in everybody's mouths, making those same people the main characters and asking the ordinary British audience member to identify with and like them is an incredibly difficult ask.
To further complicate matters, their opening action is to mug a hard working female nurse. Instead of taking on bully-boy police officers, a rival gang, frankly anything that could gain our sympathy, they threaten and rob an innocent, decent, vulnerable member of society that couldn't have been better calculated to make us hate them.
Admittedly, the film does settle down into a rather familiar story and character arc where the character does something bad and then seeks redemption through heroic action, and here the film gets it absolutely right too. John Boyega is also a star in the making, and if anyone has seen him in My Murder, in which he plays a real life murder victim in a similarly violent youth gang culture, I'm sure they can agree he's an exceptional British talent and one to watch for the future.
In short, I was rooting for the 'heroes' by the end, but was similarly repulsed by their behaviour at the start. I can completely empathise with people who cannot bring themselves to like them, regardless of their redemptive behaviour later in the movie. Labelling these critics 'racist' or 'unable to appreciate anti-heroes' is just wrong. While in some people, race is probably a factor, I think people don't like them because they so accurately portray the bogeyman of contemporary British society. That is its strength, but at the same time, also its weakness.