MetaGLM/zhipuai-sdk-java-v4

Android 项目编译报错

Closed this issue · 1 comments

gradle 文件依赖:
implementation("cn.bigmodel.openapi:oapi-java-sdk:release-V4-2.0.2")

报错信息如下:
1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeDebugJavaResource'.

A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
2 files found with path 'META-INF/DEPENDENCIES' from inputs:
- D:\dev.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpclient\4.5.14\1194890e6f56ec29177673f2f12d0b8e627dec98\httpclient-4.5.14.jar
- D:\dev.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpcore\4.4.16\51cf043c87253c9f58b539c9f7e44c8894223850\httpcore-4.4.16.jar
Adding a packaging block may help, please refer to
https://developer.android.com/reference/tools/gradle-api/8.3/com/android/build/api/dsl/Packaging
for more information

  • Try:

Run with --stacktrace option to get the stack trace.
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.org.
==============================================================================

2: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeExtDexDebugAndroidTest'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Failed to transform scala-library-2.13.1.jar (org.scala-lang:scala-library:2.13.1) to match attributes {artifactType=android-dex, dexing-component-attributes=ComponentSpecificParameters(minSdkVersion=24, debuggable=true, enableCoreLibraryDesugaring=false, enableGlobalSynthetics=false, enableApiModeling=false, dependenciesClassesAreInstrumented=false, asmTransformComponent=null, useJacocoTransformInstrumentation=false, enableDesugaring=true, needsClasspath=false, useFullClasspath=false, componentIfUsingFullClasspath=null), org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingNoClasspathTransform: D:\dev.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-library\2.13.1\1418c956704990564fb9dfac5960647ca54b5a91\scala-library-2.13.1.jar.
> Error while dexing.
Increase the minSdkVersion to 26 or above.

  • Try:

Run with --stacktrace option to get the stack trace.
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.org.
==============================================================================

3: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeExtDexDebug'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Failed to transform scala-library-2.13.1.jar (org.scala-lang:scala-library:2.13.1) to match attributes {artifactType=android-dex, dexing-component-attributes=ComponentSpecificParameters(minSdkVersion=24, debuggable=true, enableCoreLibraryDesugaring=false, enableGlobalSynthetics=false, enableApiModeling=false, dependenciesClassesAreInstrumented=false, asmTransformComponent=null, useJacocoTransformInstrumentation=false, enableDesugaring=true, needsClasspath=false, useFullClasspath=false, componentIfUsingFullClasspath=null), org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingNoClasspathTransform: D:\dev.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-library\2.13.1\1418c956704990564fb9dfac5960647ca54b5a91\scala-library-2.13.1.jar.
> Error while dexing.
Increase the minSdkVersion to 26 or above.

不支持android