Not able to launch the application getting bad pid 'uiautomator'

If you search past discussions for “bad pid uiautomator”, you’ll find this topic has been discussed before. Here’s one such discussion:

Support version Android N