Android Studio INSTALL_FAILED_DEXOPT and INSTALL_FAILED_UID_CHANGED on project run

Android Studio INSTALL_FAILED_DEXOPT and INSTALL_FAILED_UID_CHANGED on project run

I'm learning Android Studio, and this error keeps popping up.
(on Emulators)
pkg: /data/local/tmp/com.test.sunshine
Failure [INSTALL_FAILED_UID_CHANGED]

and this
(on Physical Device)
pkg: /data/local/tmp/com.test.sunshine
Failure [INSTALL_FAILED_DEXOPT]

It will 
Read more