What happens is inevitably, you either use subtitles as a subconscious crutch, where you then won't learn anything, or you will get so frustrated with un-subbed anime that you'll either stop and turn the subs back on or will end up learning at a rate that is easily 1/5 of a normal speaker's learning rate (not to mention you'll be illiterate at the end of all of this).
Anime is one tool in your arsenal for learning Japanese, it can help for practice (I myself watch anime frequently in order to practice), but it can't be the only tool. You, on top of watching anime, need to do other things like keeping up to date with learning kanji and vocabulary, listen to podcasts, write journal entries, read blogs and textbooks about learning Japanese, whatever, but you need to do SOMETHING other than watch anime. It'd be like trying to become a bodybuilding, but the only exercise you ever did was bicep curls, just because you love bicep curls.
And if you end up saying, "that's not me, I won't ever give up even if the going's slow, because I really enjoy anime." To that I say, stop deluding yourself. You're not a special snowflake, so get the fuck over it. And even if you are, by some snowball's chance in hell, that outlier, you'll have Japanese that is broken at best, and unintelligible at worst. You're preconceived notions of language will shatter any chance you have of absorbing the language by osmosis through anime alone, so let's stop pretending.
That said, it's a really fun process to learn Japanese once you get going. Just be open to new things and don't be afraid to explore a bit and you should be fine.
TL;DR No you can't learn using only anime, but it is a good tool to have