As others have noted, this problem can be caused by an attached device/emulator while uninstalling the app and AS connection still exists. On my end, I just delete all the build folders (under app and project dirs) in the project, and relaunch the application on the device/emulator.