robertvazan / sourceafis-java

Fingerprint recognition engine for Java that takes a pair of human fingerprint images and returns their similarity score. Supports efficient 1:N search.
https://sourceafis.machinezoo.com/java
Apache License 2.0
245 stars 100 forks source link

Build error on android kotlin #36

Closed kelvinkioko closed 3 years ago

kelvinkioko commented 3 years ago

Getting this issue "com.android.tools.r8.errors.b: One or more instruction is preventing default interface method from being desugared: java.lang.Double it.unimi.dsi.fastutil.objects.Reference2DoubleMap.getOrDefault(java.lang.Object, java.lang.Double)" on android kotlin when I try to build the project or generate an APK

robertvazan commented 3 years ago

I will have to find time to reproduce this. Meantime please use version 3.10.0, which was tested on Android.

kelvinkioko commented 3 years ago

Are there any min sdk, target sdk and compile sdk requirements with version 3.10.0?

I switched to version 3.10.0 and the error is still the same. Doing this on an empty project with no other libraries.

robertvazan commented 3 years ago

Android API level 24+

kelvinkioko commented 3 years ago

Works on debug runs but project build or APK generation still fails with this error AGPBI: {"kind":"error","text":"com.android.tools.r8.errors.b: One or more instruction is preventing default interface method from being desugared: java.lang.Object it.unimi.dsi.fastutil.ints.Int2ObjectMap.getOrDefault(java.lang.Object, java.lang.Object)","sources":[{"file":"C:\\Users\\Kelvin\\.gradle\\caches\\transforms-2\\files-2.1\\21ba6f848e0139c51edc78af2f0d9e47\\jetified-fastutil-8.3.0.jar"}],"tool":"R8"}

robertvazan commented 3 years ago

This is similar to fastutil #136, which is caused by a bug in desugar, which should be fixed by now. Try upgrading your Android toolchain.

kelvinkioko commented 3 years ago

Thank you very much for the assistance. You are a life saver