A$AP Rocky's canceling his European festival performance and several other upcoming tour dates ... because being locked up in a Swedish jail cell makes it hard to get onstage in Spain. The rapper's management tells TMZ he'll be detained "for an unknown period of time for acting in self-defense during an altercation that took place," so, therefore ... he's been forced to cancel all his upcoming shows in July.
He was scheduled to perform at Sonar -- a music fest in Barcelona, Spain -- on Friday, July 19 ... but Sonar says it's now looking for a replacement.
A$AP's scheduled to headline Wednesday night at the Green Theatre in Moscow, but that's clearly not happening. His other upcoming shows getting axed due to him being locked up include the Splash! Fest in Germany on the 12, concerts in Ukraine and Belgium on the 13 and 14, a sold-out gig in Milan on the 17 ... and 2 others on the 20 and 21.
We broke the story ... the rapper's team says he's being held in inhumane conditions in his Swedish cell, and one official for the U.S. Embassy there commented, "Walking into that place was like walking into a toilet."
Rocky can be held for at least 2 weeks while prosecutors decide whether to charge him for aggravated assault stemming from a street brawl. That's despite video showing the alleged victim being the initial aggressor ... physically attacking Rocky and his crew prior to the incident.
A growing number of celebs -- along with AR's legal team -- are demanding his release ... but so far to no avail.