Skip to content

android 导入sdk报错 Unsupported class file major version 61 #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lyxxman opened this issue Dec 13, 2024 · 3 comments
Open

android 导入sdk报错 Unsupported class file major version 61 #169

lyxxman opened this issue Dec 13, 2024 · 3 comments

Comments

@lyxxman
Copy link

lyxxman commented Dec 13, 2024

场景:android接入sdk
项目配置:
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
导入版本:
implementation('com.huaweicloud:esdk-obs-android:3.24.9'){
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
}
报错:
Caused by: org.gradle.api.internal.artifacts.transform.TransformException: Failed to transform jackson-core-2.15.4.jar (com.fasterxml.jackson.core:jackson-core:2.15.4) to match attributes {artifactType=enumerated-runtime-classes, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61
这个怎么解决?

@liqiuqiu111
Copy link

本地编译环境版本与sdk版本不兼容,建议使用sdk的3.21.11版本试试。

@zzq996
Copy link
Collaborator

zzq996 commented Feb 24, 2025

试下依赖排除、降级
implementation ('com.huaweicloud:esdk-obs-android:3.24.9') {
exclude group: 'com.squareup.okio', module: 'okio'
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-annotations'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
}
implementation 'com.squareup.okhttp3:okhttp:3.14.9'
implementation 'com.squareup.okio:okio:1.17.6'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.12.5'
implementation 'com.fasterxml.jackson.core:jackson-core:2.12.5'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.5'

@wsdydeni
Copy link

wsdydeni commented Mar 3, 2025

试下依赖排除、降级 implementation ('com.huaweicloud:esdk-obs-android:3.24.9') { exclude group: 'com.squareup.okio', module: 'okio' exclude group: 'com.squareup.okhttp3', module: 'okhttp' exclude group: 'com.fasterxml.jackson.core', module: 'jackson-annotations' exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core' exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind' } implementation 'com.squareup.okhttp3:okhttp:3.14.9' implementation 'com.squareup.okio:okio:1.17.6' implementation 'com.fasterxml.jackson.core:jackson-annotations:2.12.5' implementation 'com.fasterxml.jackson.core:jackson-core:2.12.5' implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.5'

ojbk了,还得是issues里面有解决方案。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants