Why aren't my shin splints going away for weeks?

Maybe something else. Usually shin splints will take longer than a few weeks to go away. However, if you feel you have rested and done the stretching enough to relieve the discomfort, you may need to be evaluated for another fairly common condition that mimics shin splints: tibial stress fractures.
Avoid offending spor. The most important thing would be to avoid whatever activity or sport has caused the problem in the first place. If you are not improving with ice and rest, you should be seen by an orthopedist to make sure you do not have a stress fracture.