title: Android Studio assert not working
body: <p>I'm calling <code>findViewById</code> and Android Studio (version 3.1, stable) prompts me to put an assertion:</p>
  
  <p><a href="https://i.stack.imgur.com/JKpCM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JKpCM.jpg" alt="enter image description here"></a></p>
  
  <p>When I select it, it adds the following line above the selected line:</p>
  
  <p><code>assert v != null;</code></p>
  
  <p>Great. I run the app, and the <code>View v</code> is null. However, assertion doesn't work and it jumps to the line below it in debugger:</p>
  
  <p><a href="https://i.stack.imgur.com/g93rr.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g93rr.jpg" alt="enter image description here"></a></p>
  
  <p>How is this even possible? It was Android Studio's own suggestion, and I didn't change a thing. Its own recommendation/autogenerated code is not working. Am I missing something obvious?</p>