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
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.
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.
**
. 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
**
**. Create a new folder and call it anything you like, For example i called this "sample_data"..
**
**. 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.
**
. 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'
. Finally sync your gradle file and rebuild your project... Your SFb model would have been generated in the location you specified..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With