首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >nodeBuilder() / NodeBuilder -无法解析symbol - Elastic Search Java API (在安卓上)

nodeBuilder() / NodeBuilder -无法解析symbol - Elastic Search Java API (在安卓上)
EN

Stack Overflow用户
提问于 2017-06-21 02:19:46
回答 1查看 1.1K关注 0票数 1

我添加了Gradle依赖项compile 'org.elasticsearch.client:transport:5.2.1'

当Gradle构建被同步时,我得到了一个警告列表。

代码语言:javascript
复制
Warning:WARNING: Dependency commons-logging:commons-logging:1.1.3 is ignored for release as it may be conflicting with the internal version provided by Android.
Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.5.2 is ignored for release as it may be conflicting with the internal version provided by Android.
Warning:WARNING: Dependency commons-logging:commons-logging:1.1.3 is ignored for release as it may be conflicting with the internal version provided by Android.
Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.5.2 is ignored for release as it may be conflicting with the internal version provided by Android.
Warning:WARNING: Dependency commons-logging:commons-logging:1.1.3 is ignored for debug as it may be conflicting with the internal version provided by Android.
Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.5.2 is ignored for debug as it may be conflicting with the internal version provided by Android.
Warning:WARNING: Dependency commons-logging:commons-logging:1.1.3 is ignored for debug as it may be conflicting with the internal version provided by Android.
Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.5.2 is ignored for debug as it may be conflicting with the internal version provided by Android.

但是Gradle构建是成功的。现在我在nodeBuilder()NodeBuilder得到一个错误。错误是:Cannot resolve symbol。我该如何解决这个问题?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-06-21 05:28:24

ElasticSearch托管在Maven central上。在您的Maven项目中,您可以定义要在pom.xml文件中使用的ElasticSearch版本,如下所示:

代码语言:javascript
复制
<dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch</artifactId>
    <version>0.90.3</version>
</dependency>

Android Studio不使用Maven作为其构建器,而是使用Gradle。因此,尝试添加此依赖项:

代码语言:javascript
复制
dependencies {
    ...
    compile 'org.elasticsearch:elasticsearch:0.90.3'
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44660410

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档