当前位置:   article > 正文

Android组件化BUG_could not isolate parameters com.android.build.gra

could not isolate parameters com.android.build.gradle.internal.dependency.aa

BUG描述:

Android Studio 4.1 创建application module 和 多个libraury module,并且在application module引入libraury module independency时出现:

  1. Execution failed for task ':app:mergeDexDebug'.
  2. > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
  3. > Failed to transform classes.jar (project :mylibrary) to match attributes {artifactType=android-dex, com.android.build.api.attributes.BuildTypeAttr=debug, com.android.build.api.attributes.VariantAttr=debug, dexing-enable-desugaring=true, dexing-incremental-transform=false, dexing-is-debuggable=true, dexing-min-sdk=19, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=androidJvm}.
  4. > Could not isolate parameters com.android.build.gradle.internal.dependency.AarToClassTransform$Params_Decorated@7c88e18d of artifact transform AarToClassTransform
  5. > Current thread does not hold the state lock for project :app

解决方法:

将每个module下的 build.gradle里的android标签里的compileOptions标签注释掉

  1. android {
  2. // compileOptions {
  3. // sourceCompatibility JavaVersion.VERSION_1_8
  4. // targetCompatibility JavaVersion.VERSION_1_8
  5. // }
  6. }

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/398088
推荐阅读
相关标签
  

闽ICP备14008679号