Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find method release() for arguments

I've just updated my project to the Android Gradle plugin 0.9.0 and I'm getting the following error trying to run my project:

FAILURE: Build failed with an exception.

* Where:                    
Build file 'C:\...\facebookSDK\build.gradle' line: 12

* What went wrong:          
A problem occurred evaluating project ':facebookSDK'.
> Could not find method release() for arguments [build_3ug2bdgu6mi6jljp3krac916n3$_run_closure1_closure4@e1bf3ff] on project ':facebookSDK'.

* Try:                      
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

I only get this error with one of my projects. If I switch back to 0.8.+ it works fine.

This is the gradle.build file of the facebookSDK module.

apply plugin: 'android-library'

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.3"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 8
    }

    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }

    lintOptions {
        abortOnError false
    }
}

dependencies {
    compile 'com.android.support:support-v4:+'
}
like image 548
Androiderson Avatar asked Mar 05 '14 21:03

Androiderson


1 Answers

i'm pretty sure that release { ... } should be inside buildTypes(which should be inside android) not in android

like image 110
Selvin Avatar answered Sep 28 '22 02:09

Selvin