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

changing resValue in variant

changing resValue in variant

I have two product flavors and three build types.
buildTypes {
    debug {
        signingConfig signingConfigs.debug
    }
    release {
        signingConfig signingConfigs.release
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
    qa {
        applicationIdSuffix ".qa"
        signingConfig 
Read more