java - Android application building fails after upgrading bouncycastle from 1.76 to 1.78 - Stack Overflow

I'm working on an Android project that was using Bouncy Castle version 1.76, but after upgrading t

I'm working on an Android project that was using Bouncy Castle version 1.76, but after upgrading to 1.78.1, the project is no longer building. The project is running on OpenJDK 17. Has anyone encountered this issue before, or does anyone know what might be causing the build failure?

Here are the error logs:

Failed to transform bcprov-jdk18on-1.78.jar (.bouncycastle:bcprov-jdk18on:1.78) to match attributes {artifactType=android-jni, .gradle.category=library, .gradle.libraryelements=jar, .gradle.status=release, .gradle.usage=java-runtime}.
      > Execution failed for JetifyTransform: /Users/oluwaseun.oyewale/.gradle/caches/modules-2/files-2.1/.bouncycastle/bcprov-jdk18on/1.78/619aafb92dc0b4c6cc4cf86c487ca48ee2d67a8e/bcprov-jdk18on-1.78.jar.
         > Failed to transform '/Users/oluwaseun.oyewale/.gradle/caches/modules-2/files-2.1/.bouncycastle/bcprov-jdk18on/1.78/619aafb92dc0b4c6cc4cf86c487ca48ee2d67a8e/bcprov-jdk18on-1.78.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 65. (Run with --stacktrace for more details.)
           Suggestions:
            - Check out existing issues at :460323&s=modified_time:desc, it's possible that this issue has already been filed there.
            - If this issue has not been filed, please report it at  (run with --stacktrace and provide a stack trace if possible).

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at .

The error log when i try to run the application

I'm working on an Android project that was using Bouncy Castle version 1.76, but after upgrading to 1.78.1, the project is no longer building. The project is running on OpenJDK 17. Has anyone encountered this issue before, or does anyone know what might be causing the build failure?

Here are the error logs:

Failed to transform bcprov-jdk18on-1.78.jar (.bouncycastle:bcprov-jdk18on:1.78) to match attributes {artifactType=android-jni, .gradle.category=library, .gradle.libraryelements=jar, .gradle.status=release, .gradle.usage=java-runtime}.
      > Execution failed for JetifyTransform: /Users/oluwaseun.oyewale/.gradle/caches/modules-2/files-2.1/.bouncycastle/bcprov-jdk18on/1.78/619aafb92dc0b4c6cc4cf86c487ca48ee2d67a8e/bcprov-jdk18on-1.78.jar.
         > Failed to transform '/Users/oluwaseun.oyewale/.gradle/caches/modules-2/files-2.1/.bouncycastle/bcprov-jdk18on/1.78/619aafb92dc0b4c6cc4cf86c487ca48ee2d67a8e/bcprov-jdk18on-1.78.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 65. (Run with --stacktrace for more details.)
           Suggestions:
            - Check out existing issues at https://issuetracker.google/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
            - If this issue has not been filed, please report it at https://issuetracker.google/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle..

The error log when i try to run the application

Share Improve this question edited Mar 2 at 14:09 Robert 43k18 gold badges109 silver badges172 bronze badges Recognized by Mobile Development Collective asked Mar 2 at 2:13 Oluwaseun OyewaleOluwaseun Oyewale 2113 silver badges15 bronze badges 2
  • 1 Please include the stack trace in the question as formatted text rather than a link to an image of formatted text. – Dave Newton Commented Mar 2 at 9:32
  • "Unsupported class file major version 65" means the library requires Java 21, so may be your build environment is too old? What version of Android Studio, Gradle and Android Gradle Plugin do you use? See also stackoverflow/q/79083992/150978 – Robert Commented Mar 2 at 14:10
Add a comment  | 

1 Answer 1

Reset to default -1

The error indicates you are using a wrong Java version and you need to change it.

In order to fix this, you need to navigate inside Android Studio to:

Android Studio -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle

and there, you should see a way to configure the Gradle JDK version:

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745130637a4612954.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信