Gradle build fails: Unable to find method 'org.gradle.api.tasks.testing.Test.getTestClassesDirs()Lorg/gradle/api/file/FileCollection;'

前端 未结 9 1271
北恋
北恋 2020-12-28 12:25

When i am trying to compile a imported project from github, my gradle build always fails with the following exeption.

Unable to find method \'org.gradle.api.         


        
9条回答
  •  北海茫月
    2020-12-28 12:42

    Looks like you are failing to resolve your testInstrumentation. Are you using facebook.screenshot api? if so you need to include it.

    Otherwise, just comment out the testInstrument section and see if you can build without the tests for now if you don't care about them. otherwise you need to fix your dependency usage of it.

    *comment out testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    This causes a line to get created in your manifest and it is probably not resolving properly.

提交回复
热议问题