java.lang.NullPointerException:无法调用“String.length()”,因为“<parameter1>”为空

问题描述 投票:0回答:1

今天我无法编译我的应用程序。这是我尝试重建项目时收到的错误。

java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null

Execution failed for task ':app:dexBuilderDebug'.
 Could not resolve all files for configuration ':app:detachedConfiguration18'.
    Failed to transform jetified-appcompat-resources-1.7.0-beta01-runtime.jar to match attributes {artifactType=ext-dex-dexBuilderDebug, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
       Execution failed for DexingExternalLibArtifactTransform: C:\Users\John Doe\.gradle\caches\transforms-3\a17cb0bdbb9802eb5b30084992aad901\transformed\jetified-appcompat-resources-1.7.0-beta01-runtime.jar.
          Error while dexing.
    Failed to transform appcompat-1.7.0-beta01-runtime.jar to match attributes {artifactType=ext-dex-dexBuilderDebug, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
       Execution failed for DexingExternalLibArtifactTransform: C:\Users\John Doe\.gradle\caches\transforms-3\cb6538e8f72401bf3ec35fdf09737324\transformed\appcompat-1.7.0-beta01-runtime.jar.
          Error while dexing.

enter image description here

enter image description here

enter image description here

有什么可能出问题的想法吗?

android android-studio gradle
1个回答
0
投票

我通过使用自动版本更新程序升级到 gradle 8 解决了这个问题。然后,您必须修复更多的级联错误,这些错误是对 build.gradle 和 manifest.xml 的细微调整。继续评论,我会让你知道的。

© www.soinside.com 2019 - 2024. All rights reserved.