Tuesday, January 21, 2020

Using Weka in Android

I tried to build an Android app involving the Weka machine learning library, but adding Weka to the project makes the build fail with a ton of duplicate class errors. For some reason, Weka seems to have two very similar dependencies that both get selected for the Android packaging process. One of them can be removed with a bit of extra Gradle configuration (Kotlin shown):
implementation("nz.ac.waikato.cms.weka:weka-stable:3.8.4") {
    exclude(module = "java-cup-runtime")
}

No comments:

Post a Comment