Hello, The pain in your knees and the cracking of kneecap is an alarming situation, which cannot be ignored. It could indicate damage to knee. The cartilage s in the knee act as protective mechanism and prevent wear and tear.
There could be a lot of reasons for the pain which include:
A)Meniscus tear / cartilage tear.
B)Anterior cruciate ligament injury
C)Chrondromalacia patella.
The symptoms described by you are probably due to pain in the front of the knees and the kneecap, which is called as patellofemoral syndrome. It is one of the most common causes of pain. It usually presents with pain in the knee and around the kneecap and sometimes a grinding noise or swelling of kneecap may be present.
You could continue the use of adequate rest to the knee, use of anti inflammatory drugs like ibuprofen twice a day, ice packs to bring down the swelling and also start physiotherapy which will the strengthen the muscles around the knee. Knee braces are also beneficial.
I would suggest you to get an x ray of bilateral knees along with an MRI knee and consult the Orthopedician with results of the reports. Thank you.