我在尝试编译一个使用“weka”机器学习算法的android工作室项目时遇到此错误。该项目是单一任务的一部分,只是为了清楚。
build.gradle看起来像这样:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "ac.univie.em2.project"
minSdkVersion 24
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildToolsVersion '26.0.2'
}
dependencies {
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:support-v4:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
// https://mvnrepository.com/artifact/nz.ac.waikato.cms.weka/weka-stable
implementation 'nz.ac.waikato.cms.weka:weka-stable:3.8.0'
}
我们已经尝试过的事情: 1)添加multidexenabled true标志 2)清洁和重建
编辑:我们找到了一种解决方法,不使用maven来实现weka依赖,而是直接使用3.6.6 jar。如果有人能告诉我build.gradle文件中的问题是,我仍然会喜欢它