I had a similar problem. Looked over the html several times and was sure it was correct. Then I started playing around with the order of jquery and bootstrap javascript.
Originally I had bootstrap.min.js loading BEFORE jquery.min.js. In this state, the menu would not expand when clicking on the menu icon.
Then I changed the order so that bootstrap.min.js came after jquery.min.js, and this solved the problem. I don't know enough about javascript to explain why this caused the problem (or fixed it), but that is what worked for me.
Additional info:
Both scripts are located at the bottom of the page, just before the tag.
Both scripts are hosted on CDNs, not locally hosted.
If you're pretty sure your code is correct, give this a try.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…