American rapper A$AP Rocky has been found not guilty of firing a handgun at a former friend, avoiding a potential prison term.