简体   繁体   中英

Build not running after Import Sceneform asset and model not displayed in Viewer

I'm using android studio 4.0.1 with sceneform 1.15.0, after clicking on import sceneform asset and clicking on the finish in the window on the .obj file nothing happens, the viewer shows no 3d model, and build does not run. I have tried all the fixes on stack overflow and developer.android all the header files on the app and project Gradle but of no use. Google Sceneform Tools plugin has been installed.

I was having the same problem, the best solution for me was to use GLB/GLTF files.(i use this importer https://www.npmjs.com/package/obj2gltf and the result was great)

Here are some options: Try using Android Studio 3.5. If the Sceneform Tools plugin doesn't work either, set the 3d model in the build.gradle like this

sceneform.asset('sampledata/chair/model.obj',
        'default',
        'sampledata/chair/model.sfa',
        'src/main/assets/chair')

If this doesn't work, use this tool: https://github.com/gdamoreira/google-ar-asset-converter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM