2
我gradle這個文件說搖籃錯誤configurations.add字符串不能轉換到Configuration
configurations.add "externalDeps"
如果我用1.4的gradle跑我沒有問題。
如果我用2.0的gradle跑我得到了以下錯誤:
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to org.gradle.api.artifacts.Configuration
at org.gradle.api.artifacts.Configuration$Namer.determineName(Configuration.java:87)
at org.gradle.api.internal.DefaultNamedDomainObjectCollection.add(DefaultNamedDomainObjectCollection.java:70)
at org.gradle.api.NamedDomainObjectCollection$add$0.call(Unknown Source)
at build_3p9qdtholqj79o8rnevdt3d7t0.run(D:\Code\trunk\projects\build.gradle:6)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
... 82 more
發生了什麼變化,是造成這個錯誤?
我應該如何定義這個呢?