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:
- Imported the HelloFigma component project into Figma and received a link to my component.
- Added the "Relay For Android" plugin in Android Studio and included the plugin dependency in the gradle file.
- Integrated a personal access token (PAT) into the Relay plugin for Android Studio.
- Created the component in code according to the provided instructions.
- 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:
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:
- Close Android Studio.
- Delete the "ui-packages" folder that was created in the file system, even though it didn't appear in Android Studio.
- Repeat steps one to seven from the guide.
- 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!