diff --git a/src/main/java/com/bladecoder/ink/runtime/Flow.java b/src/main/java/com/bladecoder/ink/runtime/Flow.java index 484b357..74b8057 100644 --- a/src/main/java/com/bladecoder/ink/runtime/Flow.java +++ b/src/main/java/com/bladecoder/ink/runtime/Flow.java @@ -30,7 +30,13 @@ public Flow(String name, Story story, HashMap jObject) throws Ex // choiceThreads is optional Object jChoiceThreadsObj; - jChoiceThreadsObj = jObject.getOrDefault("choiceThreads", null); + // This does not work in Android with SDK < 24 + //jChoiceThreadsObj = jObject.getOrDefault("choiceThreads", null); + if (jObject.containsKey("choiceThreads")) { + jChoiceThreadsObj = jObject.get("choiceThreads"); + } else { + jChoiceThreadsObj = null; + } loadFlowChoiceThreads((HashMap) jChoiceThreadsObj, story); }