Skip to content
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

[BUG] FastJSON2 Android依赖2.0.53版本编译不通过 #3142

Open
huannan opened this issue Oct 31, 2024 · 1 comment
Open

[BUG] FastJSON2 Android依赖2.0.53版本编译不通过 #3142

huannan opened this issue Oct 31, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@huannan
Copy link

huannan commented Oct 31, 2024

问题描述

编译不通过

环境信息

请填写以下信息:

  • OS信息: [macOS Monterey 12.7.6]
  • JDK信息: [17]
  • 版本信息:[Fastjson2 2.0.53]
  • AGP版本: [7.4.2]
  • Kotlin版本: [1.8.20]

重现步骤

如何操作可以重现该问题:

  1. Android依赖2.0.53
  2. 编译
  3. 出现 FAILED 错误
versions.fastjson2 = '2.0.53'
ext.versions = versions

implementation("com.alibaba.fastjson2:fastjson2:${versions.fastjson2}")
implementation("com.alibaba.fastjson2:fastjson2-extension:${versions.fastjson2}")

期待的正确结果

希望编译通过

相关日志输出

> Task :app:dexBuilderDebug FAILED
AGPBI: {"kind":"error","text":"java.lang.NullPointerException","sources":[{"file":"/Users/wuhuannan/.gradle/caches/transforms-3/5763dc353529590d4989d38609443ca3/transformed/jetified-fastjson2-extension-2.0.53.jar"}],"tool":"D8"}
AGPBI: {"kind":"error","text":"java.lang.NullPointerException","sources":[{"file":"/Users/wuhuannan/.gradle/caches/transforms-3/e91b484264d5939860b90136a59dc7af/transformed/jetified-fastjson2-2.0.53.jar"}],"tool":"D8"}

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:dexBuilderDebug'.
> Could not resolve all files for configuration ':app:detachedConfiguration18'.
   > Failed to transform jetified-fastjson2-extension-2.0.53.jar to match attributes {artifactType=ext-dex-dexBuilderDebug, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for DexingExternalLibArtifactTransform: /Users/wuhuannan/.gradle/caches/transforms-3/5763dc353529590d4989d38609443ca3/transformed/jetified-fastjson2-extension-2.0.53.jar.
         > Error while dexing.
   > Failed to transform jetified-fastjson2-2.0.53.jar to match attributes {artifactType=ext-dex-dexBuilderDebug, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for DexingExternalLibArtifactTransform: /Users/wuhuannan/.gradle/caches/transforms-3/e91b484264d5939860b90136a59dc7af/transformed/jetified-fastjson2-2.0.53.jar.
         > Error while dexing.

* 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

BUILD FAILED in 12s
109 actionable tasks: 15 executed, 94 up-to-date
@huannan huannan added the bug Something isn't working label Oct 31, 2024
@wenshao
Copy link
Member

wenshao commented Nov 2, 2024

看不出错误原因,你是否可以帮忙诊断下。你为什么不用2.0.53.android8版本?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants