App not installed error while sideloading and Install failed UID changed via adb [Not rooted]
For rooted devices:

Run the below command 

adb rm -rf /data/data/&lt;your.package.name&gt;


For non-rooted device:


Change the ApplicationId of the app. Refer this link to change
ApplicationId.
Build and install the app. App will install successfully because it is treated as new app.
Now uninstall this app. Which will clear the data.
Now change the ApplicationId to the previous one.
Build and install. Magic.. It will install.