[Flutter FAQs] Fixing Failed to transform bcprov-jdk18on-1.78.1.jar
Fixing Failed to transform bcprov-jdk18on-1.78.1.jar
Problem
When building a Flutter APK with the command flutter build apk --release src/main.dart
, the build process failed with the following error:
1 | FAILURE: Build failed with an exception. |
The error indicated that the Java class file major version 65 (which corresponds to Java 21) was incompatible with the current build environment. This incompatibility occurred during the Jetifier transformation process when trying to process the BouncyCastle cryptography library.