Application error localhost

So I ran

ionic cordova run android

It detected my device. It installed successfully. But upon running it says

The connection to the server was unsuccessful. (http://localhost:8100)

It was fine at first, and then boom. Anyone have an idea?