title: Cannot get property 'compileSdkVersion' on extra properties extension as it does not exist Open File
body: <p>I imported a project downloaded from GitHub into my Android Studio project as module.
  The "Import module..." wizard worked fine, but when the Adroid Studio tried to rebuild the project, it returned me this error:</p>
  
  <pre><code>Cannot get property 'compileSdkVersion' on extra properties extension as it does not exist Open File
  </code></pre>
  
  <p>The error is related to this line in the "build.gradle" file of the imported module:</p>
  
  <pre><code>compileSdkVersion rootProject.compileSdkVersion
  </code></pre>
  
  <p>I tried to add "ext" section in the project "build.gradle" like this:</p>
  
  <pre><code>ext {
      compileSdkVersion 26
  }
  </code></pre>
  
  <p>But in this way I receive a new error:</p>
  
  <pre><code>Gradle DSL method not found: 'compileSdkVersion()' Possible causes: ... 
  </code></pre>