Sore ankles during/after walks

I have been walking around my neighborhood a lot lately, but it hurts my ankles. I try to stretch them, but maybe I'm not doing enough. Could bad shoes hurt my ankles? I have cheap tennis shoes and need to get new ones anyway, but I'm wondering if that could be part of the problem.