They are both correct English, but the purpose of "however" is different in each. In (1), "however" introduces a constrasting statement, something like "but". In (2), "however" means "to whatever degree", implying to a great degree.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.