He is accused by prosecutors of production of a controlled drug, being concerned in the supply of drugs and breaching the Electricity Act 1989.
Arapi made no plea and was remanded in custody, with the case continued.
‘Police priority’
The court appearance comes after police executed a drugs warrant at a property on Benarty Avenue in Lochgelly.
A cannabis cultivation with an estimated street value of around £176,000 was seized, police said.
Sergeant Gayle Hopton said: “Drugs cause misery in our communities and tackling those responsible for the cultivation and supply of illegal substances is a priority for Police Scotland.
“The public has an important role to play and we encourage anyone with information or concerns about drugs to contact Police Scotland on 101 or make a call anonymously to Crimestoppers on 0800 555 111.”