question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MockitoCore version includes bytebuddy that is not supported for Jetifier

See original GitHub issue

Is there any specific reason to use mockito core 2.23.0 ?

The thing is that it contains a dependency to bytebuddy v 1.9 and that breaks Jetifier, in my case with:

Check: https://github.com/raphw/byte-buddy/issues/541#issuecomment-429649501

Warning: Exception while processing task java.io.IOException: Can’t write [/myapp/android/app/build/intermediates/transforms/proguard/androidTest/debug/0.jar] (Can’t read [/Users/danielgomez22/.gradle/caches/transforms-1/files-1.1/byte-buddy-agent-1.9.0.jar/ae6d09949b3f418f0c110b790fdd5881/jetified-byte-buddy-agent-1.9.0.jar(;;;;;;;**.class)] (Duplicate jar entry [module-info.class]))

Is there any way for you to force the bytebuddy dependency to be 1.8.22 instead of 1.9 or change to a mockitocore version that use it?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
matejdrocommented, Dec 17, 2018

You can add this to your gradle.build:

configurations.all {
    resolutionStrategy {
        force 'net.bytebuddy:byte-buddy:1.8.22'
        force 'net.bytebuddy:byte-buddy-agent:1.8.22'
    }
}
3reactions
nhaarmancommented, Dec 18, 2018

Mockito 2.23.0 is necessary to support coroutines, see #299 and the linked issues. You can apply https://github.com/nhaarman/mockito-kotlin/issues/312#issuecomment-447761074, but what you’d really want to do is push for Byte Buddy or Jetifier to fix the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MockitoCore version includes bytebuddy that is not ... - GitHub
I'm not sure they need a reason to use latest version of the library. It's Jetifier that needs to get fixed to support...
Read more >
NoClassDefFoundError: Mockito Bytebuddy - Stack Overflow
I'm experiencing this issue and any of the solutions worked for me. Using the last version of these dependencies, I got a "Dependency...
Read more >
Disabling Jetifier - Adam Bennett
Jetifier is simple in concept: all it does is replace android.support classes with their equivalent androidx versions. As a simple example:.
Read more >
unsupported class file major version 62 - You.com
I'm using a Java 18 early access build and while using mockito-core:3.11.2 all my tests were running fine, but when I switched to...
Read more >
platform/frameworks/support - Git at Google
+ * In your build.gradle, update any versions that refer to previous versions of + Support Library. + * To determine the correct...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found