我添加了Gradle依赖项compile 'org.elasticsearch.client:transport:5.2.1'。
当Gradle构建被同步时,我得到了一个警告列表。
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。我该如何解决这个问题?
发布于 2017-06-21 05:28:24
ElasticSearch托管在Maven central上。在您的Maven项目中,您可以定义要在pom.xml文件中使用的ElasticSearch版本,如下所示:
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>0.90.3</version>
</dependency>Android Studio不使用Maven作为其构建器,而是使用Gradle。因此,尝试添加此依赖项:
dependencies {
...
compile 'org.elasticsearch:elasticsearch:0.90.3'
}https://stackoverflow.com/questions/44660410
复制相似问题