title: How to fix "Error:Error:line (23)Gradle DSL method not found: 'android()"
body: <p>I was working on my project in Android Studio on Windows but now I am trying to open it on Ubuntu but it keeps complaining that:</p>
  
  <pre><code>Error:Error:line (23)Gradle DSL method not found: 'android()' Possible causes: //(Error23,0)
  
  The project 'POSTER' may be using a version of Gradle that does not contain the method. Open Gradle wrapper file
  The build file may be missing a Gradle plugin. Apply Gradle plugin
  </code></pre>
  
  <p><strong>Project Gradle</strong></p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  buildscript {
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:2.1.2'
          classpath 'com.google.gms:google-services:3.0.0'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  allprojects {
      repositories {
          jcenter()
      }
  }
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  
  android {
      compileSdkVersion 23
      buildToolsVersion '24.0.0'
  }
  </code></pre>
  
  <p><strong>App Gradle</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 23
      buildToolsVersion "24.0.0"
  
      defaultConfig {
          applicationId "com.ozuf.poster"
          minSdkVersion 16
          targetSdkVersion 23
          versionCode 5
          versionName "0.5 Beta"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  
  dependencies {
      compile project(':volley')
      compile fileTree(include: ['*.jar'], dir: 'libs')
      testCompile 'junit:junit:4.12'
      compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
      compile 'org.jsoup:jsoup:1.9.1'
      compile 'com.android.support:support-v4:23.4.0'
      compile 'com.android.support:appcompat-v7:23.4.0'
      compile 'com.android.support:design:23.4.0'
      compile 'com.android.support:cardview-v7:23.4.0'
      compile 'com.android.support:recyclerview-v7:23.4.0'
      compile 'ch.acra:acra:4.9.0-RC-2'
      compile 'com.google.firebase:firebase-core:9.0.2'
      compile 'com.google.firebase:firebase-ads:9.0.2'
  }
  
  
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p><strong>Gradle-wrapper.properties</strong></p>
  
  <pre><code>#Fri Apr 08 19:27:52 WAT 2016
  distributionBase=GRADLE_USER_HOME
  distributionPath=wrapper/dists
  zipStoreBase=GRADLE_USER_HOME
  zipStorePath=wrapper/dists
  distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
  </code></pre>
  
  <p>Please, do you have any idea what's causing this and how to fix it?</p>