Importing models using the Sceneform plugin on Android studio but getting 'error creating sfa'

gradle build failed with new import rules
sceneform plugin android studio
import obj to android studio
error converting asset
arfragment
arcore android example
import sceneform asset manually
android studio 3d model viewer

I'm trying the new Sceneform SDK from Google for AR.

It says to use the Google Sceneform Tools plugin to import the assets. So I'm following all the steps mentioned here to import my assets.

While importing any 3D model (in .obj or .fbx format), everytime I get this error - error creating sfa with no other details of the error and then it gives an option to revert the process of asset importing.

I'm using Android Studio 3.1.2 and I'm on Linux OS (Ubuntu 18.04).

I have verified the steps again and again but everything looks fine. Anyone else facing this same issue ?

This solution on github helped me:

Link

1.right-click the 3D asset and select "Import Sceneform Asset"

2.click "finish"

3.click "keep broken gradle changes"

4.in the "gradle files have changed..." click "sync now" - the sync succeed, the .sfa file created in sampledata folder, and .sfb file created in assets folder

Import and preview 3D assets | Sceneform (1.15.0), While importing any 3D model (in .obj or .fbx format), everytime I get this error - error creating sfa and then it gives an option to revert the process  On the top left corner of your android studio sdk, Go to **File, Click Settings and search for plugins in the window that popups, and search for Sceneform in the online plugin marketplace Step 2 Create a new folder and call it anything you like, For example i called this "sample_data"..

I've fixed this error by removing 'mtllib xxxx.mtl' in the header of my obj file.

Hope it can help someone :)

EDIT I found the solution without removing something in the obj file. Just putting in the same folder the xxxx.mtl and the xxxx.obj

Introduction to Sceneform - Codelabs, Note: To import and work with 3D models in Sceneform, ensure you have installed The sampledata folder is part of your Android Studio project, but its contents will classpath 'com.google.ar.sceneform:plugin:1.15.0' Sceneform's default materials make it easy for developers to get great looking results. Right click the 3D model source asset and select Import Sceneform Asset to begin the import process. The values are used by the sceneform.asset() entry in the app's build.gradle, and determine

There's currently an issue created on Github for this. There's a compatibility issue with the converter in Ubuntu 18.04, but I'm not sure if it applies to other distros or older versions of Ubuntu.Issue 13

Sceneform, Importing models using the Sceneform plugin on Android studio but getting 'error creating sfa'. import sceneform asset not showing sfb file android sceneform  Sceneform has an Android Studio plugin which assists in importing 3D models, adding them to the gradle file, and providing a preview of the model. You can install this by selecting File->Settings

Google has now updated the Sceneform gradle plugin with the fix for this bug. Use version 1.0.1 of the Sceneform plugin.

In your project build.gradle file, replace this -

classpath 'com.google.ar.sceneform:plugin:1.0.0'

with this -

classpath 'com.google.ar.sceneform:plugin:1.0.1'

It should import your assets perfectly. It works for me now.

Build an augmented reality Android app with Google ARCore , Sceneform provides the high level API for rendering 3D models using Java. Importing 3D models into your Android Studio project. For more information about getting started, see the Sceneform documentation. The Sceneform plugin allows the '.sfb' file to opened and adjusted in editor, but note that any edits made will  3D asset files (OBJ, FBX, glTF) can be imported, converted, and previewed using the Android Studio plugin. For more information, see Import and Preview 3D Assets . Basic shapes and materials can be programmatically combined to create more complicated objects at runtime.

Had the same error. It's not a glitch. I realized it was because the materials path in the obj file (line 1) was not correct. It still thought the name of the materials file was 'materials.mtl' when in fact I had renamed it to 'tree.mtl' (it was a model of a tree).

Lesson: don't rename the materials or texture files (unless you remember to change the paths inside the obj file).

Building ARCore apps using Sceneform, This is part 3 of a series about ARCore and Sceneform using Android Studio In this part we learn how to import 3D object to your project Under  Sceneform plugin will help you with tasks such as importing a model into your Android project. In order to install the plugin, follow the steps given below: For Windows users: Go to: File-> Settings-> Plugins; For macOS users: Go to: Android Studio-> Preferences-> Plugins; Now enter “Sceneform” in the search bar. It will be at the top named Google Sceneform Tools. Install the plugin and restart android studio. Adding Dependencies

apply plugin: 'com.google.ar.sceneform.plugin' breaking code , Importing 3D models, with the Sceneform plugin but with the release of the Sceneform plugin Google have made it possible to render 3D The Sceneform plugin requires Android Studio 3.1 or higher. You should now get a result of “​ver 3 0” or higher, which means OpenGL ES is configured correctly. Which version of Android Studio are you running? There is an incompatibility issue between the Sceneform Tools plugin and Android Studio 3.2 canary 14 & 15, and it looks like that is what you are hitting. This should not be present in canary 16 and beyond, or Android studio 3.1, and 3.2 up through canary 13.

First AR app, We're going to build a simple AR app using Sceneform, an app I call as There are many free 3D model sites are available, but the detailing So, Google has a nice place called Poly, where we can get nice 3D models. As said earlier, Android studio provides us with the plugin Google Sceneform Tools  This plugin lets you do some seriously cool stuff! The first thing we want to do is get a 3D model to use—if you don’t want to make your own, you can head on over to Poly and grab one for free (just remember to credit the creator!). The Sceneform plugin supports OBJ, FBX and glTF file formats.

I've right clicked on the .obj file and clicked on Import scene form asset. Stop Gradle build processes (requires restart)</li><li>Your project may be using a third-party plugin which is not compatible mac os High Sierra - Version 10.13.6 (17G7024); Android Studio - 3.1.3 I've seen many forums but didn't get any solution. The Google Sceneform Tools (Beta) plugin is designed to help you work with 3D assets and the Sceneform SDK to build AR apps in Android Studio.

Comments
  • Thanks for the effort. Till step 3, its fine. Even after doing step 4, the gradle is syncing fine without errors. But when I run the app, again its giving me - 'Error creating sfa.'
  • So the issue is still there.
  • Tried many things mentioned in this thread - github.com/google-ar/sceneform-android-sdk/issues/1 , still getting the same issue. Will wait till the bug gets fixed from the google team.
  • Not working for me. But the Sceneform team is working to fix the issue on Linux. Its a compatibility problem on Linux. See here - github.com/google-ar/sceneform-android-sdk/issues/13
  • this should be selected answer, thanks
  • the question was already solved more than a year ago. see the answer below.