努力使它工作,但是在编译项目时一直遇到问题。
minSdkVersion 26
为了访问默认接口和其他新的Java范例。
我通过添加删除了一些包装错误
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
这些是我的项目依赖项
dependencies {
// implementation fileTree(dir: 'libs', include: ['*.jar'])
// implementation 'com.android.support.constraint:constraint-layout:1.1.3'
// implementation 'com.android.support:support-v4:28.0.0'
// testImplementation 'junit:junit:4.12'
// androidTestImplementation 'com.android.support.test:runner:1.0.2'
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'org.osmdroid:osmdroid-android:6.0.1'
// implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.12.0'
implementation 'org.elasticsearch.client:elasticsearch-rest-high-level-client:6.5.3'
}
为了避免构建错误,我评论了所有不必要的内容,但它不断出现:
Program type already present: org.apache.lucene.document.DoubleRange
Message{kind=ERROR, text=Program type already present: org.apache.lucene.document.DoubleRange, sources=[Unknown source file], tool name=Optional.of(D8)}
Program type already present: org.apache.lucene.util.LongsRef
Message{kind=ERROR, text=Program type already present: org.apache.lucene.util.LongsRef, sources=[Unknown source file], tool name=Optional.of(D8)}
[...and so on]
有人成功使用ES高级客户端吗?我想使用比okhttp更高级的内容。