"ui-packages" folder doesn't show up after successful import of figma component with Relay for Android Studio

242 Views Asked by At

I'm using the guided tutorial here to convert the designs from Figma into code in Android Studio.

I encountered a problem at step 7, although I completed the previous steps successfully. Here's a brief summary of what I've done so far by following the guide:

  1. Imported the HelloFigma component project into Figma and received a link to my component.
  2. Added the "Relay For Android" plugin in Android Studio and included the plugin dependency in the gradle file.
  3. Integrated a personal access token (PAT) into the Relay plugin for Android Studio.
  4. Created the component in code according to the provided instructions.
  5. However, I'm facing two issues:
  • The "ui-packages" folder, which should be generated after clicking "create" in the Relay plugin, is not appearing.
  • I encountered a build error when i launched a "build and refresh", as shown in the screenshot below:

enter image description here

Build 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 hello_card.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

What am i missing or doing wrong ?

I was expecting the "ui-packages" folder to be created and the build to be successful as to render the preview of my hellofigma component

Edit: After locking my computer and being away from it for several hours, I returned and successfully resolved issue number 1. Here are the steps I took to fix the problem:

  1. Close Android Studio.
  2. Delete the "ui-packages" folder that was created in the file system, even though it didn't appear in Android Studio.
  3. Repeat steps one to seven from the guide.
  4. Now the "ui-packages" appear in Android Studio with the correct folders and files.

I still get 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 hello_card.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

I hope this information is helpful to someone!

0

There are 0 best solutions below