BBC reporting "a man under the age of 18" - so probably 16 or 17. The law says:
"Section 47 of the Criminal Procedure (Scotland) Act 1995 prohibits the publication of the name, address, school or any particulars calculated to lead to the identification of any person under the age of 18 who is an accused, victim or witness in criminal proceedings."
"This applies even when such details are revealed in open court. The media may apply to have this restriction lifted through a court motion or by lodging a formal minute"
So any person of this age will remain anonymous at least until a case goes to trial. Press can than apply to have the restrictions lifted, which they may or may not be. Often not - that case a few years back with the lad being stabbed at a school in Aberdeen had a perpetrator of 16/17 who has never been officially named. Although it doesn't stop people speculating on social media.