luckybilly / CC

业界首个支持渐进式组件化改造的Android组件化开源框架,支持跨进程调用。Componentize your android project gradually.
https://luckybilly.github.io/CC-website/
Apache License 2.0
4.05k stars 635 forks source link

gradle插件3.5.2,gradle版本5.4.1报错 #157

Closed xiaoxiaoderen closed 4 years ago

xiaoxiaoderen commented 4 years ago

java.lang.IllegalAccessError: tried to access method org.gradle.api.internal.artifacts.DefaultModuleVersionIdentifier.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V from class org.gradle.api.plugins.AndroidMavenPlugin$8 at org.gradle.api.plugins.AndroidMavenPlugin$8.execute(AndroidMavenPlugin.java:173) at org.gradle.api.plugins.AndroidMavenPlugin$8.execute(AndroidMavenPlugin.java:159) at org.gradle.configuration.project.DelayedConfigurationActions.execute(DelayedConfigurationActions.java:27) at org.gradle.configuration.project.DelayedConfigurationActions.execute(DelayedConfigurationActions.java:22) at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34) at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject$1.run(LifecycleProjectEvaluator.java:106) at org.gradle.internal.Factories$1.create(Factories.java:25)

luckybilly commented 4 years ago

@xiaoxiaoderen 感谢反馈!现已查明是源码中用来上传jcenter的maven插件的问题:https://github.com/dcendents/android-maven-gradle-plugin 该插件与gradle5.x存在兼容性问题(但在源码中的环境下工作正常):

Abandoned. If you are using Kotlin 1.3.30+ and Gradle 5.x, please use https://github.com/sky-uk/gradle-maven-plugin instead.

这个问题出现的原因是:你导入github上的源码,并修改了gradle的版本号

在其它项目中按照CC文档使用无此问题

如果要编译当前项目的源码,请恢复源码中的gradle版本号后再编译