Cannot change dependencies of configuration ‘XXX’ after it has been included in dependency resolution.
Closed this issue · 5 comments
看上去是插件内调用getDependencies出现异常,希望作者帮忙看看。(工程不引入mcImage模块时可以正常编译)
Cannot change dependencies of configuration ':platform_service:common_widget:debugApi' after it has been included in dependency resolution.
Caused by: org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':platform_service:social_lib:mergeDebugResources'.
at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.getDependencies(CachingTaskDependencyResolveContext.java:66)
at org.gradle.api.internal.tasks.AbstractTaskDependency.getDependencies(AbstractTaskDependency.java:42)
at com.smallsoho.mcplugin.image.ImagePlugin$apply$1$1.execute(ImagePlugin.kt:115)
at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:158)
at com.smallsoho.mcplugin.image.ImagePlugin$apply$1.execute(ImagePlugin.kt:61)
at com.smallsoho.mcplugin.image.ImagePlugin$apply$1.execute(ImagePlugin.kt:16)
由于项目gradle版本原因,使用的mcimage为1.4.0版本
麻烦提供下gradle 版本,我复现一下
我也遇到同样的问题,原因是:apply plugin: 'McImage'这个一定要写在apply plugin: 'kotlin-android'下面:
解决方法:
apply plugin: 'kotlin-android'
apply plugin: 'McImage'
已解决,关闭了