/*
 * Copyright (C) 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.android.filament.gltfio;

public class Gltfio {
    /**
     * Initializes the gltfio JNI layer. Must be called before using any gltfio functionality.
     */
    public static void init() {
        System.loadLibrary("gltfio-jni");
    }
}

@@ -659,16 +659,62 @@
 ltfio;%0A%0A
+import com.google.android.filament.Filament;%0A%0A
 public c
@@ -870,16 +870,139 @@
 nit() %7B%0A
+        // Load Filament first to ensure that the NioUtils Java class is available in the JNIEnv.%0A        Filament.init();%0A
         

Fix Gltfio.init(): call Filament.init() as well