None of the solutions here (or elsewhere) worked until I did a very simple thing: 
I downloaded another camera app from the Play Store. All of them are taking pics normally.

This solved my problem when the camera app started showing error "memory unavailable" after programming the SD card to work as internal memory so I could actually have some space in my phone.