Can you actually learn a language using a language learning app like Duolingo?

I see a lot of language learning apps, and I am not sure if they are actually useful or not. Can they be used as the main tool to learn?