Android关于接入SDK所用jdk版本比项目高的报错问题

本文介绍了解决在使用Firebase Performance Monitoring插件时遇到的Java版本不兼容问题。当Firebase Perf插件由更高版本的Java编译,而当前项目使用的Java版本较低时,会导致UnsupportedClassVersionError错误。解决方案是在Android Studio中将Gradle JDK设置为JDK 11。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

* What went wrong:
A problem occurred evaluating project ':app'.
> java.lang.UnsupportedClassVersionError: com/google/firebase/perfugin/FirebasePerfPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
  • What went wrong:
    A problem occurred evaluating project ‘:app’.

java.lang.UnsupportedClassVersionError: com/google/firebase/perfugin/FirebasePerfPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

解决办法如下
在Android Studio中,选择菜单栏设置 File->Settings->Build,Excutiong, -> Build Tools ->Gradle -> Gradle JDK 为JDK11
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值