Gradle Error:Gradle DSL method not found: 'executeWithoutThrowingTaskFailure()'

Related searches

I've recently updated android SDK tools to v23 and now when I open a project of mine it cannot compile, im getting this message:

Error:Gradle DSL method not found: 'executeWithoutThrowingTaskFailure()'

Does someone knows what can be the issue here? Here is my app.gradle code:

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

apply plugin: 'com.android.application'

apply plugin: 'io.fabric'
apply plugin: 'android-apt'
apply plugin: 'com.raizlabs.griddle'
apply plugin: 'com.neenbedankt.android-apt'

repositories {
    mavenCentral()
    maven { url 'https://maven.fabric.io/public' }
    maven { url "https://jitpack.io" }
}

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.myapp"
        minSdkVersion 10
        targetSdkVersion 23
        versionCode 2
        versionName "1.3.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {

    compile('com.crashlytics.sdk.android:crashlytics:2.5.0@aar') {
        transitive = true;
    }

    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:design:22.2.0'
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile 'commons-io:commons-io:2.4'
    compile 'uk.co.chrisjenx:calligraphy:2.1.0'
    compile 'com.google.code.gson:gson:2.3.1'
    compile('com.github.nkzawa:socket.io-client:0.5.0') {
        exclude group: 'org.json', module: 'json'
    }
    //http
    compile 'com.squareup.retrofit:retrofit:1.9.0'
    //db
    apt 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
    compile 'com.raizlabs.android:DBFlow-Core:2.2.1'
    compile 'com.raizlabs.android:DBFlow:2.2.1'
    //graph
    compile 'com.jjoe64:graphview:4.0.1'
    compile 'com.github.PhilJay:MPAndroidChart:v2.1.3'

    compile project(':mobihelp_sdk_android_v1.5.1')
    compile 'com.facebook.android:facebook-android-sdk:4.1.0'

    compile 'com.apptentive:apptentive-android:1.7.3@aar'

    compile "com.mixpanel.android:mixpanel-android:4.6.2"
    compile "com.google.android.gms:play-services:3.1+"
    compile 'com.github.lzyzsd:circleprogress:1.1.0@aar'

    compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
}

Fixed mine by closing Adroid Studio and then

$ cd <project root>
$ rm -r .idea

Then start up Android Studio and re-open your project. This forces Gradle to build the project again and hopefully your issue will be sorted.

Gradle DSL method not found, I think you simply change your build.gradle file. Check if part: android { compileSdkVersion 23 buildToolsVersion '23.0.2'. is on the top of your build. gradle . Error:(16, 0) Gradle DSL method not found: 'compileSdkVersion()' Possible causes: The project 'MyProject' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0). Upgrade plugin to version 2.3.3 and sync project.


I might be late to the party, but my case is different, i need to import 2 maven URL, so what i did write in gradle is :

maven 
{
    url 'https://maven.fabric.io/public', 
    url 'https://jitpack.io
}

where i should've write like this :

maven { url 'https://maven.fabric.io/public' }
maven { url 'https://jitpack.io' }

Gradle DSL method not found: 'compileOnly()' � Issue #1718 , I'm trying to add apollo-android to my android project (Kotlin) and I've faced this error Gradle DSL method not found: 'compileOnly()' Possible� Error:(9, 0) Gradle DSL method not found: 'compile()' I have tried refering to similar questions but it did not work. Android gradle build Error:(9, 0) Gradle DSL meth Stack Overflow


Go to File > Settings > Build, Execution, Deployment > Build Tools > Gradle

Make sure you select Use default gradle wrapper (recommended) at Project-level settings.

Project-level settings

Android Studio, How to solve Android Studio Gradle DSL method not found: 'testImplementation()' error. It Duration: 1:40 Posted: Jun 15, 2019 Error:(10, 0) Gradle DSL method not found: 'compile()' Possible causes:The project 'TuteSample' may be using a version of Gradle that does not contain th Hello, buddy! I'm a coder.


buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

This should be in your project level gradle file

And other dependencies in your app level gradle file

Gradle DSL Method Not Found Sync Issue, Gradle DSL Method Not Found Sync Issue How to fix Gradle project sync failed Android Duration: 3:10 Posted: Sep 19, 2019 Error:(20, 0) Gradle DSL method not found: ‘compile()’ Possible causes: The project ‘staymax’ 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; Am i missing any step? Please suggest. Build.Gradle(app)


Gradle DSL method not found: 'testImplementation()', However I get the following error: Gradle DSL method not found: ' testImplementation()' Possible causes: The project 'Patterns' may be using a� The project 'FeedBack' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0). Fix plugin version and sync project; The project 'FeedBack' 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.


The Android Gradle plugin has been in rapid development, and as features evolved the APIs and the build file description language went through several incompatible changes. If you are trying to load a project that was built with an older version of the Gradle plugin, it may not build correctly with 1.0.0.