When I run my app it gives me this error after successful compilation and gradle buil Error running 'app' Writing not allowed due to timeout or cancellation
When I run same app on different devices. It doesn't give me any error.
What worked for me was a combination of the other answers and an IDE restart:
Uninstalled app from the device
Restarted ADB using command: adb kill-server; adb start-server
Removed USB cable and replugged it (Still didn't work at this point)
Restarted Android Studio
(Now able to launch my app on the device!)