I recently tried to implement sceneform in my android project . I changed the sample directories "assets" and renamed it to "sampledata" as shown below. I also added my own 3d model and added the path in the uri.parse statement. But the app keeps crashing on the button click which inflates the sceneform class.
the logs show as follows :
2022-06-01 19:44:30.767 5032-5032/com.example.whooby E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.whooby, PID: 5032
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.whooby/com.example.whooby.whooby}: android.view.InflateException: Binary XML file line #17: Binary XML file line #17: Error inflating class com.google.ar.sceneform.SceneView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: android.view.InflateException: Binary XML file line #17: Binary XML file line #17: Error inflating class com.google.ar.sceneform.SceneView
Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class com.google.ar.sceneform.SceneView
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
at android.view.LayoutInflater.createView(LayoutInflater.java:645)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:706)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:195)
at com.example.whooby.whooby.onCreate(whooby.kt:27)
at android.app.Activity.performCreate(Activity.java:6679)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: java.lang.IllegalStateException: Couldn't create Engine
at com.google.android.filament.Engine.create(Engine.java:216)
at com.google.ar.sceneform.rendering.EngineInstance.createFilamentEngine(EngineInstance.java:66)
at com.google.ar.sceneform.rendering.EngineInstance.createEngine(EngineInstance.java:132)
at com.google.ar.sceneform.rendering.EngineInstance.getEngine(EngineInstance.java:43)
at com.google.ar.sceneform.rendering.Renderer.initialize(Renderer.java:641)
at com.google.ar.sceneform.rendering.Renderer.(Renderer.java:86)
at com.google.ar.sceneform.SceneView.initialize(SceneView.java:373)
at com.google.ar.sceneform.SceneView.(SceneView.java:103)
I recently tried to implement sceneform in my android project . I changed the sample directories "assets" and renamed it to "sampledata" as shown below. I also added my own 3d model and added the path in the uri.parse statement. But the app keeps crashing on the button click which inflates the sceneform class.
the logs show as follows :
2022-06-01 19:44:30.767 5032-5032/com.example.whooby E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.whooby, PID: 5032 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.whooby/com.example.whooby.whooby}: android.view.InflateException: Binary XML file line #17: Binary XML file line #17: Error inflating class com.google.ar.sceneform.SceneView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Caused by: android.view.InflateException: Binary XML file line #17: Binary XML file line #17: Error inflating class com.google.ar.sceneform.SceneView Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class com.google.ar.sceneform.SceneView Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:430) at android.view.LayoutInflater.createView(LayoutInflater.java:645) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) at android.view.LayoutInflater.rInflate(LayoutInflater.java:858) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.rInflate(LayoutInflater.java:861) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.inflate(LayoutInflater.java:518) at android.view.LayoutInflater.inflate(LayoutInflater.java:426) at android.view.LayoutInflater.inflate(LayoutInflater.java:377) at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:706) at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:195) at com.example.whooby.whooby.onCreate(whooby.kt:27) at android.app.Activity.performCreate(Activity.java:6679) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Caused by: java.lang.IllegalStateException: Couldn't create Engine at com.google.android.filament.Engine.create(Engine.java:216) at com.google.ar.sceneform.rendering.EngineInstance.createFilamentEngine(EngineInstance.java:66) at com.google.ar.sceneform.rendering.EngineInstance.createEngine(EngineInstance.java:132) at com.google.ar.sceneform.rendering.EngineInstance.getEngine(EngineInstance.java:43) at com.google.ar.sceneform.rendering.Renderer.initialize(Renderer.java:641) at com.google.ar.sceneform.rendering.Renderer.(Renderer.java:86)
at com.google.ar.sceneform.SceneView.initialize(SceneView.java:373)
at com.google.ar.sceneform.SceneView.(SceneView.java:103)