我在ec2
的aws
实例上运行solr,并且在solrj
实例的lib文件夹中添加了solr
库,并在solr.config
中添加了路径,但是仍然得到以下信息错误:
12-03 01:20:59.010: E/AndroidRuntime(5594):
java.lang.NoClassDefFoundError: Failed resolution of:
Lorg/apache/solr/client/solrj/impl/HttpSolrClient$Builder;
我还需要做什么?
最佳答案
将solrj添加为libary:
摇篮
// https://mvnrepository.com/artifact/org.apache.solr/solr-solrj
compile group: 'org.apache.solr', name: 'solr-solrj', version: '6.3.0'
Maven:
<!-- https://mvnrepository.com/artifact/org.apache.solr/solr-solrj -->
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>6.3.0</version>
</dependency>
关于java - java错误:java.lang.NoClassDefFoundError,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/40945008/