One of the witnesses warned Andy that the police were behind him and that he should drop the gun. Andy ignored the warning and kept walking with the gun slinged on his shoulder.
If the kid had raised the gun, apparently with the intent to fire, I wouldnt be criticizing the cops. However, the kid knew he only had a pellet gun so its unlikely that he would have done that.
According to the DA's report, Andy did raise the gun as he turned. They hired experts to verify that was consistent with the evidence. Andy was also high on pot at the time, which probably affected his judgement.
If it was a case where the police really did think the kid was going to fire, I can accept that. In most reports that I did read on the issue made it seem more of a case of pretext.