Missing ui-packages directory after importing Figma design using Relay plugin in Android Studio

I’m following a tutorial to convert Figma designs into Android code using the Relay plugin. Everything seems to work fine during the import process, but I’m running into two main problems.

First, the ui-packages folder that should appear after importing my Figma component just doesn’t show up in the project structure. I’ve set up my personal access token correctly and the import process completes without any obvious errors.

Second, when I try to build the project, I get this error:

Execution failed for task ':app:generateDebugRelayCode'.
> A failure occurred while executing com.google.d2c.gradle.GenerateCode$GenerateCodeWorkAction
   > Converting SVG files: Exception Converting SVG resources for welcome_card.

I managed to fix the first issue by restarting Android Studio and removing any hidden ui-packages folders from the file system before reimporting. The folder now shows up properly.

However, the build error with SVG conversion is still happening. Has anyone encountered similar issues with Relay? What could be causing the SVG conversion to fail during the code generation process?

I’ve faced a similar SVG error before, and it’s often due to unsupported SVG elements or broken paths in your Figma components. The Relay plugin tends to struggle with complex SVGs and effects. It’s worth checking your welcome_card component for complicated masks, gradients, or filters, as these tend to cause issues. Try to simplify the component first by flattening layers or removing complex effects temporarily to see if that resolves the build problem. Personally, I found success by exporting the troublesome component as a PNG and gradually reintroducing vector elements to identify what’s causing the conversion failure. The error logs can be vague, so this trial-and-error approach may actually be time-saving.