Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More than one file was found with OS independent path 'mockito-extensions/org.mockito.plugins.MockMaker' #149

Open
snijsure opened this issue Nov 19, 2019 · 2 comments

Comments

@snijsure
Copy link

I am working on project where we are just now switching from gradle 4.10 to gradle 5.1 and upgrading to latest version android gradle plugin

However I am encountering following error when using gradle 5.1

  • What went wrong:
    Execution failed for task ':app:mergeDebugAndroidTestJavaResource'.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
More than one file was found with OS independent path 'mockito-extensions/org.mockito.plugins.MockMaker'

Note we do have file in src/test/resources/mockito-extensions/ that allows us to mock kotlin classes.

This setup (file in src/test/.... directory) has worked fine when using gradle 4.X

Was wondering if this is a known issue and if there is way to fix it?

@chenriquevz
Copy link

chenriquevz commented Jan 25, 2020

I have the same issue, only after adding,androidTestImplementation 'org.mockito:mockito-android:2.28.2' to my project.

My solution was to remove "androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.12.1'", kept only TestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.12.1'"

Did you find a solution?

@drewhannay
Copy link
Contributor

I think this can maybe happen if you're using both dexmaker-mockito and mockito-android or mockito in your androidTestImplementation. Both of these libraries do the same thing, so you can remove everything except dexmaker-mockito from androidTestImplementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants