title: android install failed invalid apk version code inconsistent android O
body: <p>INSTALL_FAILED_INVALID_APK</p>
  
  <p>This error occurs when switching flavors &amp; building a debug version after making a release version on my Pixel2 XL. The dialog asks to uninstall the existing application but the app is already gone on the device. It seems that there is a temp file triggering this flow again and again. Restarting Android studio / cleaning doesn't seem to help so my guess is it has something to do with Android O / my Pixel2 XL.</p>
  
  <p><a href="https://i.stack.imgur.com/znIOg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/znIOg.png" alt="enter image description here"></a></p>
  
  <p>Any clues as to how to resolve this?</p>