Fix: QR scanning issues on API below 24.
This had to do with the zebra crossing (zxing) library using a Java 8 sorted API that is not available until Android API 24. The previous fix was to revert to an older version of zxing but now R8/D8 allows for desugaring so that the sort API now works.
This commit is contained in:
parent
44d10dad73
commit
b78bd5c5f1
|
@ -78,6 +78,8 @@ android {
|
|||
}
|
||||
}
|
||||
compileOptions {
|
||||
// emable support for new langauge APIs but also fix the issue with zxing on API < 24
|
||||
coreLibraryDesugaringEnabled true
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
@ -146,6 +148,8 @@ dependencies {
|
|||
implementation Deps.AndroidX.Navigation.UI_KTX
|
||||
implementation Deps.AndroidX.Room.ROOM_KTX
|
||||
kapt Deps.AndroidX.Room.ROOM_COMPILER
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
||||
|
||||
|
||||
// Google
|
||||
implementation Deps.Google.GUAVA
|
||||
|
|
|
@ -44,6 +44,7 @@ class QrAnalyzer(val scanCallback: (qrContent: String, image: ImageProxy) -> Uni
|
|||
null
|
||||
} catch (e: Throwable) {
|
||||
twig("Error while scanning QR: $e")
|
||||
twig(e)
|
||||
null
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue