【发布时间】:2018-05-29 12:26:10
【问题描述】:
我正在尝试使用 stanford corenlp 对单词进行词形还原,但是当我添加了如下依赖项时。
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
android {
compileSdkVersion 27
defaultConfig {
minSdkVersion 23
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
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'
compile 'ai.api:sdk:2.0.7@aar'
compile 'ai.api:libai:1.6.12'
compile 'com.android.support:appcompat-v7:27.1.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
compile 'edu.stanford.nlp:stanford-corenlp:3.8.0'
}
repositories {
mavenCentral()
}
当我运行我的应用程序时,它给了我以下异常:
错误:com.android.builder.dexing.DexArchiveBuilderException:无法处理 C:\Users\LPT-0096.gradle\caches\modules-2\files-2.1\edu.stanford.nlp\stanford-corenlp\3.8 .0\79c0ba8dba9734bf51d898f4526117980f7c49c5\stanford-corenlp-3.8.0.jar 错误:com.android.builder.dexing.DexArchiveBuilderException:com.android.tools.r8.errors.CompilationError:仅支持从 Android N 开始的默认接口方法(--min-api 24):void edu.stanford.nlp。 pipeline.Annotator.unmount() 错误:com.android.tools.r8.errors.CompilationError:仅支持从 Android N 开始的默认接口方法(--min-api 24):void edu.stanford.nlp.pipeline.Annotator.unmount() 错误:任务“:ModroidApp:transformClassesWithDexBuilderForDebug”执行失败。 com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: 无法处理 C:\Users\LPT-0096.gradle\caches\modules- 2\files-2.1\edu.stanford.nlp\stanford-corenlp\3.8.0\79c0ba8dba9734bf51d898f4526117980f7c49c5\stanford-corenlp-3.8.0.jar
请帮助我为什么每次运行我的应用程序时都会出现以下异常。
【问题讨论】:
-
任何不赞成投票的理由
标签: java android stanford-nlp lemmatization