I had the same issue multiple times.
It kept happening till I figured this one out.
Try this.
1. Go to Storage in the Settings menu.
2. Open the options , there should be one that says USB computer connection
3. While the device is connected to your computer, Check the Media device (MTP)...