title: Android run fails with message Failed to finalize session: INSTALL_FAILED_TEST_ONLY
body: <p>I recently upgraded to gradle 3.4.1 on Android Studio 2.3.1. My build was working earlier. Anyway, the error I'm getting is: </p>
  
  <p><a href="https://i.stack.imgur.com/8xhcX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8xhcX.png" alt="enter image description here"></a></p>
  
  <p>I've wiped the data to the avd, made sure the app wasn't on it, restarted android studio and my mac, and made sure I didn't have the android:testOnly="true" flag set (I don't). I also added the flag and set it to false, but I still get the error. </p>