title: Error inflating class com.google.ar.sceneform.ArSceneView
body: <p>I have an error this is my Logcat</p>
  <pre><code>2020-07-26 12:14:50.756 30507-30507/com.tuto.myapplication E/AndroidRuntime: FATAL EXCEPTION: main
  Process: com.tuto.myapplication, PID: 30507
  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tuto.myapplication/com.tuto.myapplication.MainActivity}: android.view.InflateException: Binary XML file line #27 in com.tuto.myapplication:layout/activity_main: Binary XML file line #22 in com.tuto.myapplication:layout/sceneform_ux_fragment_layout: Binary XML file line #22 in com.tuto.myapplication:layout/sceneform_ux_fragment_layout: Error inflating class com.google.ar.sceneform.ArSceneView
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3782)
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
   Caused by: android.view.InflateException: Binary XML file line #27 in com.tuto.myapplication:layout/activity_main: Binary XML file line #22 in com.tuto.myapplication:layout/sceneform_ux_fragment_layout: Binary XML file line #22 in com.tuto.myapplication:layout/sceneform_ux_fragment_layout: Error inflating class com.google.ar.sceneform.ArSceneView
   Caused by: android.view.InflateException: Binary XML file line #22 in com.tuto.myapplication:layout/sceneform_ux_fragment_layout: Binary XML file line #22 in com.tuto.myapplication:layout/sceneform_ux_fragment_layout: Error inflating class com.google.ar.sceneform.ArSceneView
   Caused by: android.view.InflateException: Binary XML file line #22 in com.tuto.myapplication:layout/sceneform_ux_fragment_layout: Error inflating class com.google.ar.sceneform.ArSceneView
   Caused by: java.lang.reflect.InvocationTargetException
      at java.lang.reflect.Constructor.newInstance0(Native Method)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:343)       android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1016)
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:971)
      at android.view.LayoutInflater.rInflate(LayoutInflater.java:1133)
      at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1094)
      at android.view.LayoutInflater.inflate(LayoutInflater.java:692)
      at android.view.LayoutInflater.inflate(LayoutInflater.java:536)
      at com.google.ar.sceneform.ux.BaseArFragment.onCreateView(BaseArFragment.java:162)
      at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2600)
      at androidx.fragment.app.FragmentManagerImpl.ensureInflatedFragmentView(FragmentManagerImpl.java:1138)
      at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:851)
      at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1133)
      at androidx.fragment.app.FragmentManagerImpl.addFragment(FragmentManagerImpl.java:1393)
      at androidx.fragment.app.FragmentManagerImpl.onCreateView(FragmentManagerImpl.java:3205)
      at androidx.fragment.app.FragmentController.onCreateView(FragmentController.java:134)
      at androidx.fragment.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:357)
      at androidx.fragment.app.FragmentActivity.onCreateView(FragmentActivity.java:336)
      at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1079)
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1007)
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:971)
  2020-07-26 12:14:50.758 30507-30507/com.tuto.myapplication E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:1133)
      at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555)
      at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
      at com.tuto.myapplication.MainActivity.onCreate(MainActivity.java:77)
      at android.app.Activity.performCreate(Activity.java:8086)
      at android.app.Activity.performCreate(Activity.java:8074)
      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1313)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
   Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/filament/gltfio/Gltfio;
      at com.google.ar.sceneform.rendering.EngineInstance.gltfioInit(EngineInstance.java:96)
      at com.google.ar.sceneform.rendering.EngineInstance.createEngine(EngineInstance.java:110)
      at com.google.ar.sceneform.rendering.EngineInstance.getEngine(EngineInstance.java:42)
      at com.google.ar.sceneform.rendering.Renderer.initialize(Renderer.java:542)
      at com.google.ar.sceneform.rendering.Renderer.&lt;init&gt;(Renderer.java:109)
      at com.google.ar.sceneform.SceneView.initialize(SourceFile:37)
  
     2020-07-26 12:14:50.759 30507-30507/com.tuto.myapplication E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class &quot;com.google.android.filament.gltfio.Gltfio&quot; on path: DexPathList[[zip file &quot;/data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/base.apk&quot;, zip file &quot;/data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_dependencies_apk.apk&quot;, zip file &quot;/data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_resources_apk.apk&quot;, zip file &quot;/data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_0_apk.apk&quot;, zip file &quot;/data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_1_apk.apk&quot;, zip file &quot;/data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_2_apk.apk&quot;, zip file &quot;/data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_3_apk.apk&quot;, zip file &quot;/data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_4_apk.apk&quot;, zip file &quot;/data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_5_apk.apk&quot;, zip file &quot;/data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_6_apk.apk&quot;, zip file &quot;/data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_7_apk.apk&quot;, zip file &quot;/data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_8_apk.apk&quot;, zip file &quot;/data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_9_apk.apk&quot;],nativeLibraryDirectories=[/data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/lib/arm64, /data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/base.apk!/lib/arm64-v8a, /data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_dependencies_apk.apk!/lib/arm64-v8a, /data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_resources_apk.apk!/lib/arm64-v8a, /data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_0_apk.apk!/lib/arm64-v8a, /data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_1_apk.apk!/lib/arm64-v8a, /data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_2_apk.apk!/lib/arm64-v8a, /data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_3_apk.apk!/lib/arm64-v8a, /data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_4_apk.apk!/lib/arm64-v8a, /data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_5_apk.apk!/lib/arm64-v8a, /data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_6_apk.apk!/lib/arm64-v8a, /data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_7_apk.apk!/lib/arm64-v8a, /data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_8_apk.apk!/lib/arm64-v8a, /data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_9_apk.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64, /hw_product/lib64, /system/product/lib64]]
      at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
          ... 53 more
      Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_resources_apk.apk
      at dalvik.system.DexFile.openDexFileNative(Native Method)
      at dalvik.system.DexFile.openDexFile(DexFile.java:365)
      at dalvik.system.DexFile.&lt;init&gt;(DexFile.java:107)
      at dalvik.system.DexFile.&lt;init&gt;(DexFile.java:80)
      at dalvik.system.DexPathList.loadDexFile(DexPathList.java:444)
      at dalvik.system.DexPathList.makeDexElements(DexPathList.java:403)
      at dalvik.system.DexPathList.&lt;init&gt;(DexPathList.java:164)
      at dalvik.system.BaseDexClassLoader.&lt;init&gt;(BaseDexClassLoader.java:126)
      at dalvik.system.BaseDexClassLoader.&lt;init&gt;(BaseDexClassLoader.java:101)
      at dalvik.system.PathClassLoader.&lt;init&gt;(PathClassLoader.java:74)
      at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:87)
  2020-07-26 12:14:50.759 30507-30507/com.tuto.myapplication E/AndroidRuntime:     at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:116)
      at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:130)
      at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:75)
      at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:914)
      at android.app.LoadedApk.getClassLoader(LoadedApk.java:1015)
      at android.app.LoadedApk.getResources(LoadedApk.java:1264)
      at android.app.ContextImpl.createAppContext(ContextImpl.java:2611)
      at android.app.ContextImpl.createAppContext(ContextImpl.java:2599)
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7075)
      at android.app.ActivityThread.access$2200(ActivityThread.java:296)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2208)
              ... 6 more
      Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.tuto.myapplication-R6xbR4NAzgk5zRoAjKzIxA==/split_lib_slice_0_apk.apk
      at dalvik.system.DexFile.openDexFileNative(Native Method)
      at dalvik.system.DexFile.openDexFile(DexFile.java:365)
      at dalvik.system.DexFile.&lt;init&gt;(DexFile.java:107)
      at dalvik.system.DexFile.&lt;init&gt;(DexFile.java:80)
      at dalvik.system.DexPathList.loadDexFile(DexPathList.java:444)
      at dalvik.system.DexPathList.makeDexElements(DexPathList.java:403)
      at dalvik.system.DexPathList.&lt;init&gt;(DexPathList.java:164)
      at dalvik.system.BaseDexClassLoader.&lt;init&gt;(BaseDexClassLoader.java:126)
      at dalvik.system.BaseDexClassLoader.&lt;init&gt;(BaseDexClassLoader.java:101)
      at dalvik.system.PathClassLoader.&lt;init&gt;(PathClassLoader.java:74)
      at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:87)
      at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:116)
      at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:130)
      at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:75)
      at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:914)
      at android.app.LoadedApk.getClassLoader(LoadedApk.java:1015)
      at android.app.LoadedApk.getResources(LoadedApk.java:1264)
      at android.app.ContextImpl.createAppContext(ContextImpl.java:2611)
      at android.app.ContextImpl.createAppContext(ContextImpl.java:2599)
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7075)
      at android.app.ActivityThread.access$2200(ActivityThread.java:296)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2208)
              ... 6 more
  </code></pre>
  <p>this is my code
  MainActivity.java:</p>
  <pre><code>public class MainActivity extends AppCompatActivity implements Scene.OnUpdateListener {
  
  private customArFragment mCustomArFragment;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      try {
          mCustomArFragment = (customArFragment) getSupportFragmentManager().findFragmentById(R.id.fragment);
          mCustomArFragment.getArSceneView().getScene().addOnUpdateListener(this);
      }catch (Exception e){
          e.printStackTrace();
      }
  
  }
  
  public void setUpDatabase(Config config, Session session){
      Bitmap nature = BitmapFactory.decodeResource(getResources(),R.drawable.nature);
      AugmentedImageDatabase aid = new AugmentedImageDatabase(session);
      aid.addImage(&quot;nature&quot; , nature);
      config.setAugmentedImageDatabase(aid);
  }
  
  
  @Override
  public void onUpdate(FrameTime frameTime) {
      Frame frame = mCustomArFragment.getArSceneView().getArFrame();
      Collection&lt;AugmentedImage&gt; images = frame.getUpdatedTrackables(AugmentedImage.class);
      for (AugmentedImage image : images){
          if (image.getTrackingState() == TrackingState.TRACKING){
              if (image.getName().equals(&quot;nature&quot;)){
                  Anchor anchor = image.createAnchor(image.getCenterPose());
                  createModel(anchor);
              }
          }
      }
  }
  
  private void createModel(Anchor anchor) {
      ModelRenderable.builder()
              .setSource(this , Uri.parse(&quot;untitled.sfb&quot;))
              .build()
              .thenAccept(modelRenderable -&gt; { placeModel(modelRenderable,anchor); });
  
  }
  
  private void placeModel(ModelRenderable modelRenderable, Anchor anchor) {
      AnchorNode anchorNode = new AnchorNode(anchor);
      anchorNode.setRenderable(modelRenderable);
      mCustomArFragment.getArSceneView().getScene().addChild(anchorNode);
  }
  </code></pre>
  <p>}</p>
  <p>activity_main.xml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
   &lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
  xmlns:tools=&quot;http://schemas.android.com/tools&quot;
  android:layout_width=&quot;match_parent&quot;
  android:layout_height=&quot;match_parent&quot;
  tools:context=&quot;.MainActivity&quot;&gt;
  
  &lt;fragment
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      android:id=&quot;@+id/fragment&quot;
      android:name=&quot;com.tuto.myapplication.customArFragment&quot;/&gt;
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  <p>customArFragment :</p>
  <pre><code>public class customArFragment extends ArFragment {
  @Override
  protected Config getSessionConfiguration(Session session) {
      Config config = new Config(session);
      config.setUpdateMode(Config.UpdateMode.LATEST_CAMERA_IMAGE);
      config.setFocusMode(Config.FocusMode.AUTO);
      session.configure(config);
      this.getArSceneView().setupSession(session);
  
      ((MainActivity)getActivity()).setUpDatabase(config,session);
  
      return config;
  }
  </code></pre>
  <p>}</p>
  <p>thank you</p>
  <p>//EDIT1: Just edited the stacktrace in order to be exploitable.
  Needed to add some details so I have to writer some lines.</p>
  <p>Please add some explanations; details about each block of code ...</p>
  <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum</p>