Fastlane Android:Gradle sync failed: Could not find method screengrabVersion() for arguments

541 Views Asked by At

In Event Log,

Gradle sync failed: Could not find method screengrabVersion() for arguments [/Users/adminuser/Desktop/MyProject/version.properties] on project ':screengrab-lib' of type org.gradle.api.Project.

In Message Gradle Sync,

Error:(5, 0) Gradle DSL method not found: 'screengrabVersion()' 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
  • The project 'MyProject' 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
  • And nothing happen when I Click on "Upgrade plugin to version 2.3.3 and sync project"

    I am using Android Studio version 2.3.3. Please help me on it.

    1

    There are 1 best solutions below

    0
    On

    After checking many hours I removed module dependency and put below Gradle dependency in App build.gradle file and It's working fine now,

     androidTestCompile("tools.fastlane:screengrab:1.0.3", {
        exclude group: 'com.android.support', module: 'support-annotations'
    })