Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while importing FBX with Import Sceneform Asset in Android Studio 3.6

Tags:

android

arcore

Im using a sceneform android sdk animation example project and am trying to import my own FBX for test. I add my fbx to sampledata/models and click on Import Sceneform Asset. Im getting an error ... "Gradle build failed with new import rules. Would you like to revert the changes?"

In the event log window I get Error: java.lang.RuntimeException: java.lang.NoSuchMethodError: com.android.tools.idea.templates.recipe.RecipeExecutor.append(Ljava/io/File;Ljava/io/File;)V

Im using Android Studio 3.6 Gradle 3.6.0 sceneform plugin 1.15

Any suggestion how to fix this would be welcomed

like image 879
NccWarp9 Avatar asked Feb 26 '20 12:02

NccWarp9


People also ask

What is Sceneform plugin?

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. It requires Android Studio versions 3.1 and above.


1 Answers

There was a compatibility issue between android studio 3.6 and sceneform... So use this work around of manually generating the sfb file to solve compatible issues ..

Here is the FULL answer that will help anybody that's new to this and wanna use sceneform well without problems.

**

Step 1

. 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 step1

**

Step 2

**. Create a new folder and call it anything you like, For example i called this "sample_data"..step2

**

Step 3

**. Copy your 3D model source asset file (*.obj, *.fbx, or .gltf), and all of its dependencies (.mtl, *.bin, *.png, *.jpg, etc.) into the sampledata folder.

step3picture

**

Step 4

. Now paste this code format below **on the last line on your app's gradle build file in order to import MANUALLY and avoid any compatibility issues with the right-click method of importing which was seen in Android studio version 3.6... Of course dont forget to import lastest dependencies of Sceneform in your list of gradle dependencies

apply plugin: 'com.google.ar.sceneform.plugin', sceneform.asset('sample_data/Your-3d-Model-file-Name.obj',

'default', // 'Material Path' specified during import.

'sample_data/Your-3d-Model-file-Name.sfa',

'src/main/res/raw') // 'location you want to store the generated .sfb file' step4pic

Step 5

. Finally sync your gradle file and rebuild your project... Your SFb model would have been generated in the location you specified..

like image 76
Samuel Ewudzi Incoom Avatar answered Oct 18 '22 14:10

Samuel Ewudzi Incoom