gpt4 book ai didi

gradle - gradle PlayRun任务:定义assetsDirs属性时的 “Cannot invoke method getAt() on null object”

转载 作者:行者123 更新时间:2023-12-03 06:05:41 26 4
gpt4 key购买 nike

有人可以帮我定义此任务吗?

task start(type: PlayRun) {
applicationJar file('dest/build/playBinary/lib/api.jar')
assetsJar file('dest/build/playBinary/lib/api-assets.jar')
assetsDirs [file('dest/public')]
}
所有路径均有效。当我运行 gradle start时,总是在控制台中出现以下错误:

Cannot invoke method getAt() on null object


这是我的软版本:

Gradle 2.14

Build time: 2016-06-14 07:16:37 UTC Revision:
cba5fea19f1e0c6a00cc904828a6ec4e11739abc

Groovy: 2.4.4

Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015

JVM: 1.8.0_05 (Oracle Corporation 25.5-b02)

OS: Linux 3.16.0-4-amd64 amd64

platform play: '2.4.8', scala: '2.11'


我做错了什么?

最佳答案

Here是解决方案:

assetDirs [] looks to the Groovy compiler like an array access. If you want to assign a list you need an = sign.

关于gradle - gradle PlayRun任务:定义assetsDirs属性时的 “Cannot invoke method getAt() on null object”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39006041/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com