Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle DSL method not found: 'has()'

Tags:

After latest update of android studio , using classpath 'com.android.tools.build:gradle:2.3.0-beta1' , I am getting the following error on gradle sync .
Error:Gradle DSL method not found: 'has()'

Any ideas

Update its casused by android volley , full error :

Error:FAILURE: Build failed with an exception.

  • Where: Script 'D:\APPS-MOBI**\Android\volley\bintray.gradle' line: 64

  • What went wrong: A problem occurred evaluating script.

    Could not find method has() for arguments [release] on project ':volley' of type org.gradle.api.Project.

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

like image 803
Zaid Kajee Avatar asked Dec 20 '16 08:12

Zaid Kajee


1 Answers

The Volley project has given the following warning for a while now:

The has() method has been deprecated and is scheduled to be removed in Gradle 3.0. Please use the hasProperty() or ext.has() method instead.

Changing the line in Volley's bintray.gradle file from

publish = project.has("release")

to

publish = project.hasProperty("release")

Seems to fix the issue

like image 52
Andrew Porritt Avatar answered Nov 13 '22 15:11

Andrew Porritt