title: Why is the declaration of GridLayout different in Android Studio 3.5.1 compared to the earlier versions of Android Studio?
body: <p>So I went through a tutorial today in which the creater used the earliest version of Android Studio 3.x.x and I found out that the line</p>
  
  <p><code>GridLayout gridLayout = (GridLayout) findViewById(R.id.gridLayout);</code></p>
  
  <p>would not work for my version of Android Studio (3.5.1).</p>
  
  <p>After a quick google search I found out that I have to write </p>
  
  <p><code>androidx.gridlayout.widget.GridLayout gridLayout = findViewById(R.id.gridLayout);</code></p>
  
  <p>instead. </p>
  
  <p>Can anyone explain why the code would get more complicated in the newer version and why the old code does not work? Also, why is the code for the declarations of other views still the same</p>
  
  <p>(e.g. <code>Button playAgainButton = (Button) findViewById(R.id.playAgainButton);</code>) ?</p>
  
  <p>Where does this inconsistency come from?</p>