【发布时间】:2019-08-24 20:26:45
【问题描述】:
我正在尝试使用 Gradle 和命令行在 Kotlin 中包含 org.apache.commons.net.* 库。
在我写的 build.gradle.kts 文件的依赖项中:
compile 'commons-net:commons-net:3.6' 正如apache documentation 中所说,但它给了我一个奇怪的错误:
> Configure project :
e: D:\core\Confidential\Learn\Kotlin\build.gradle.kts:30:13: Too many characters
in a character literal ''commons-net:commons-net:3.6''
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\core\Confidential\Learn\Kotlin\build.gradle.kts' line: 30
* What went wrong:
Script compilation error:
Line 30: compile('commons-net:commons-net:3.6')
^ Too many characters in a character literal ''commons-ne
t:commons-net:3.6''
1 error
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
(我也试过compile 'commons-net:commons-net:3.6'和compile group: 'commons-net', name: 'commons-net', version: '3.6')。
我对 Kotlin 完全陌生,在开始使用 IDEA 进行 Android 开发之前,我正在尝试熟悉它。
谢谢。
【问题讨论】:
标签: gradle kotlin gradle-kotlin-dsl