The boy was identified as Joshua Simmons of Long Beach, authorities said in a news release.
Shortly before 9:30 p.m. Friday, officers were called to a public housing complex in the 1000 block of East Via Wanda, between Orange and Atlantic avenues, the statement said.
They arrived to find Simmons on a basketball court suffering from gunshots wounds to the upper body, investigators said. Paramedics were summoned to the scene, where Simmons was pronounced dead.
Police later learned that the teenager had arranged to buy a cellphone from someone through an online marketplace application and was to meet him at the crime scene location.
"During the transaction, an altercation occurred that escalated to the fatal shooting," the news release said.
Detectives identified the suspected gunman as Jose Bustamante Cardenas, 24, of Los Angeles, according to police.
Cardenas was arrested on suspicion of murder and a firearm was seized from him, authorities said. He was booked at the Long Beach City Jail, where he was being held in lieu of $2 million bail.
Long Beach police homicide detectives urged anyone with information about the shooting to call (562) 570-7244 or Crime Stoppers at (800) 222-8477.