From 8a1de1a582bd3996f28b0ac917b6facac252eaa9 Mon Sep 17 00:00:00 2001 From: Adam Pocock Date: Wed, 29 Jan 2020 11:46:00 -0500 Subject: [PATCH] Java - requesting JNI_VERSION_1_6 rather than JNI_VERSION_1_8 to support Android. --- java/src/main/native/OrtJniUtil.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/src/main/native/OrtJniUtil.c b/java/src/main/native/OrtJniUtil.c index 66fda20650..f2d97dd24a 100644 --- a/java/src/main/native/OrtJniUtil.c +++ b/java/src/main/native/OrtJniUtil.c @@ -10,7 +10,9 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) { // To silence unused-parameter error. // This function must exist according to the JNI spec, but the arguments aren't necessary for the library to request a specific version. (void)vm; (void) reserved; - return JNI_VERSION_1_8; + // Requesting 1.6 to support Android. Will need to be bumped to a later version to call interface default methods + // from native code, or to access other new Java features. + return JNI_VERSION_1_6; } /**