前言
看下這個完整的bug:
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id 'com.github.dcendents.android-maven']
然后吧左邊的信息看完全:
Caused by: java.lang.IllegalArgumentException: Unable to determine constructor argument #1: missing parameter of type Factory,
or no service of type Factory<LoggingManagerInternal>.
根據上述兩個其實是告訴我們這個plugin無法加載。
解決
然后進入build.gradle進行查看這個plugin 發現classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
這一行有一層蒙層,然后打開把鼠標放上去,顯示我們的有效版本為2.1,然后try again吧。