Closed 05nelsonm closed 1 year ago
Hi,
thank you for your report. I fixed a PR for this. @Willena will you have a look?
It's maybe worth mentioning that there are other calls in the codebase that will cause crashes on older Android devices, such as a call to Arrays.stream()
in this same file, and a call to ConcurrentHashMap.newKeySet()
in DB.java
. Older Android devices only have the Java 6 standard library.
These issues can be resolved without changes to sqlite-jdbc-crypt
by enabling library desugaring. desugar_jdk_libs
needs to be at least version 2 to support ConcurrentHashMap.newKeySet()
.
Minimum SDK support is API 23. See >> https://github.com/xerial/sqlite-jdbc/issues/961
ConcurrentHashMap.newKeySet()
called in DB.java
runs fine using xerial/sqlite-jdbc
, so that's a non-issue (unless my issue ticket is re-opened with support for APIs less than 23 :crossed_fingers: ), but that'd need to be fixed upstream.
Arrays.stream()
might also be a problem, unsure though. Can definitely test out a -SNAPSHOT
version if you'd like @Willena
@05nelsonm unfortunately I won't be able to provide you a snapshot version in the next week or two. But you should be able to easily build a snapshot yourself taking the last released sqlite binaries (available as a zip in the release page).
Describe the bug Android API 23 and below throws an exception because
SQLiteConfig.applyRemainingPragmas
function utilizesstream()
which is not available.To Reproduce
jniLibs
directoryJDBC.isValidUrl(null) // Android API 23 and below does not automatically load services, so need to proc registration by referencing JDBC
Expected behavior Exception should not be thrown
Logs
Environment (please complete the following information):
Android (Emulator API 23)
x86
3.41.2.1