Failed to notify build listener. > org.gradle.api.artifacts.result.ComponentSelectionReason.getDescr

  • Post author:
  • Post category:其他


报错:

Errors occurred while build effective model from E:\gradle-7.0\bin\caches\modules-2\files-2.1\com.google.zxing\core\3.4.0\b7eab116a61512d8b669efcd69446cc45243bd28\core-3.4.0.pom:

‘dependencyManagement.dependencies.dependency.systemPath’ for com.google.android:android:jar must specify an absolute path but is /${env.ANDROID_HOME}/platforms/android-22/android.jar in com.google.zxing:core:3.4.0

FAILURE: Build failed with an exception.

  • What went wrong:

    Failed to notify build listener.

    org.gradle.api.artifacts.result.ComponentSelectionReason.getDescription()Ljava/lang/String;

原因:IDEA版本的发行日期低于gradle版本的发行日期。就是gradle太新了,IDEA不兼容。

解决方案:更换gradle版本为当前使用的IDEA版本发行日期之前的(或升级IDEA版本)。



版权声明:本文为csonst1017原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。