I have a crackling/ snapping in my knee when going up/down stairs. Xray shows nothing but my knee hurts? May I have torn ligament?

Probably not a lig. The snapping you hear is usually your knee cap snapping on your femur. That comes from a muscle imbalance in your quad muscle. Ysually the outer quad is stronger than the inner one and therefore pulls the knee cap to the outside of the groove it normally sits in your femur. Work on inner quad or vmo strength to correct the problem.
Doubt it. The most common and likely cause of cracking/popping in front of the knee is an irritated or early wear of the knee cap cartilage or the surface cartilage of the thigh bone that it rubs. Other causes could include a meniscus tear, plica, patellar tendonitis etc. Some fluid build up in the knee causes cracking. Try therapy, antiinflammatories, ice and sometimes a knee sleeve. See orthopedist.