Error:(3, 0) Gradle DSL method not found: 'android()' Possible causes:The project 'PayBillet' may be using a version of Gradle that does not contain the method. The build file may be missing a Gradle plugin. 

What can cause this error and how to fix it?

Attaching a gradle module file

 configurations.maybeCreate("default") artifacts.add("default", file('sqljdbc42.jar')) android { compileOptions { targetCompatibility JavaVersion.VERSION_1_7 sourceCompatibility JavaVersion.VERSION_1_7 } } 

    1 answer 1

    It's simple, the answer was already here: https://stackoverflow.com/a/27735956/5834068 If in Russian: Check if you have the latest versions of Gradle and Android studio

    https://www.gradle.org/

    http://tools.android.com/tech-docs/new-build-system/version-compatibility

    1. Modify the build.gra file:

       buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:2.0.0' } } allprojects { repositories { mavenCentral() } } 
    2. Edit the app / build.gradle file:

       apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion '23.0.3' defaultConfig { minSdkVersion 9 targetSdkVersion 23 versionCode 1 versionName '1.0' } } dependencies { compile 'com.android.support:appcompat-v7:23.2.1' } 
    3. And run Gradle

        gradle installDebug