无法将Gradle依赖项添加到我的Codename One项目中 [英] Cannot add Gradle dependencies to my Codename One Project
问题描述
我正在使用Netbeans使用Codename One构建一个简单的在线应用程序,我想使用Ably进行互联网通信,但我无法导入Ably API。
这是构建提示窗口:
如果您需要更多信息,请告知我们。谢谢!
构建提示应为 android.gradleDep
不 gradleDep
因为它是Android特定的标志。
我建议在依赖结束时添加分号,例如: 编译'io.ably:ably-java:1.0.0';
I'm building a simple online app with Netbeans using Codename One, and I wanted to use Ably for internet communication, but I'm having trouble importing the Ably API.
Ably's site tells me that I need to add the line compile 'io.ably:ably-java:1.0.0'
to the build.gradle dependencies section, but there is no build.gradle in my project. After seeing this question, I added a new build hint with gradleDependencies
as the key and compile 'io.ably:ably-java:1.0.0'
as the value.
When I try to run the project, though, it still fails and tells me error: package io.ably.lib.types does not exist
import io.ably.lib.types.*;
.
I did some more research, but everything seems to say that I did the right thing, like this and this. I also tried changing the build hint key to android.gradleDep
, but nothing changed.
Here's what it looks like on Netbeans:
Here's the build hints window:
If you need any more info, please let me know. Thanks!
The build hint should be android.gradleDep
not gradleDep
as it's an Android specific flag.
I would recommend adding a semicolon at the end of the dependency too e.g.: compile 'io.ably:ably-java:1.0.0';
这篇关于无法将Gradle依赖项添加到我的Codename One项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!