Execution failed for task mockableAndroidJar, mockable-android- . jar already exists

后端 未结 5 1625
借酒劲吻你
借酒劲吻你 2021-01-12 08:26

I am facing issue with Android Studio 3, gradle android plugin 3 with build target 27 and support lib 27.0.0

Error:Execution failed for task \':module:mockab         


        
5条回答
  •  天涯浪人
    2021-01-12 09:09

    I have this issue as well as I'm using a modified android.jar (which has all the hidden API revealed). I don't use the unit testing and there's no apparent way to disable it in Android Studio 2.2.2, so I found a workaround for this problem:

    Go to File -> Settings -> Build, Execution, Deployment -> Compiler Add to "Command-line Options": -x :app:prepareReleaseUnitTestDependencies -x :app:mockableAndroidJar -x :app:compileReleaseUnitTestSources Press "OK" and try to Rebuild Project again. Now the unit testing compilation tasks will always be skipped and no errors will be thrown.

提交回复
热议问题