Android jetifier cannot transform byte-buddy and byte-buddy agent jars
See original GitHub issueHello,
I’m using mockito-android to mock objects for emulator/device tests. byte-buddy appears to prevent Android’s new jetifier from working
> Failed to transform file 'byte-buddy-1.9.0.jar' to match attributes {artifactType=jetified-jar} using transform JetifyTransform
   > Failed to transform '\home\.gradle\caches\modules-2\files-2.1\net.bytebuddy\byte-buddy\1.9.0\8cb0d5baae526c9df46ae17693bbba302640538b\byte-buddy-1.9.0.jar' using Jetifier. Reason: The type does not support '.' as package separator!. (Run with --stacktrace for more details.) To disable Jetifier, set android.enableJetifier=false in your gradle.properties file.
> Failed to transform file 'byte-buddy-agent-1.9.0.jar' to match attributes {artifactType=jetified-jar} using transform JetifyTransform
   > Failed to transform 'C:\home\.gradle\caches\modules-2\files-2.1\net.bytebuddy\byte-buddy-agent\1.9.0\37b5703b4a6290be3fffc63ae9c6bcaaee0ff856\byte-buddy-agent-1.9.0.jar' using Jetifier. Reason: The type does not support '.' as package separator!. (Run with --stacktrace for more details.) To disable Jetifier, set android.enableJetifier=false in your gradle.properties file.
Issue Analytics
- State:
 - Created 5 years ago
 - Comments:14 (7 by maintainers)
 
Top Results From Across the Web
jetifier fails to transform .JAR dependency [131207170]
This fails on build in Android Studio (3.4.0, gradle 3.4.0), and also using jetifier-standalone (with and without using flags such as -stripSignature, -strict)....
Read more >Byte Buddy is creating +1 TRANSFORM after every test class ...
I'm using Micronaut 3.0 and Byte Buddy 1.12.6, Groovy for testing. The problem occurs when I'm running whole package of tests at once...
Read more >unsupported class file major version 59 android studio - You.com ...
It was possible to fix it by setting android.jetifier.blacklist=bcprov-jdk15on in gradle.properties as mentioned here. Open side panel.
Read more >error running installers.cmd: log file not found – IDEs Support ...
I am getting an error running installers.cmd on the idea/222.4167.29 sources: FATAL: java.nio.file.NoSuchFileException:...
Read more >A Guide to Byte Buddy - Baeldung
A quick and practical example of using ByteBuddy - a tool for runtime class creation.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Just pin Byte Buddy to version 1.8.22. Byte Buddy supports the Java module system from 1.9.0 up. I figure Android will slowly adapt to the new class files as those will pop up more and more so this will come up anyways. Ideally, Android will not stick on Java 7 forever to begin with.
I do not think that this will cause any problems on Mockito in the log run as the newer APIs are not required and the major changes in Byte Buddy are extensions or support for new Java VM releases.
I’m having a similar issue with Jetifier here (albeit with a different stacktrace). Tried to use version 1.9.0 and version 1.9.1 but still get the error: