One of the most important rules!!!
Changing from STABLE to Developer(newer) you just have to wipe cache/dalvik if it's the same Android(6,7,8)!!!
Changing from Developer to Stable you MUST wipe system/data/cache/dalvik!!!
Changing to another Android version you MUST format data,not only wipe...