In Figma added rectangle with rounded corners and a text over it. Created a component out of it and defined UI package in relay plugin (tap handler for the rectangle and text-content for the text.
Saved.
After importing UI package and trying to build I get the: Converting SVG files: Exception Converting SVG resources for component_1.
My gradle initially had " id ‘com.google.relay’ version ‘0.3.05’ " defined, this gave me this strange SVG error. I have reduced it to 0.3.00 and then got a less mysterious error where it stated that I need to configure my JAVA_HOME.
After I have set the JAVA_HOME on my windows in environment variables: C:\Program Files\Java\jre-1.8 (point to JRE or JDK) I cleaned and rebuilt the project and all was good.
I have the same issue too, and here is my solution.
First of all, I run the relay plugin on Windows, and when i just start to load the Google HelloCard relay demo, the gradle gives me this error.
* What went wrong:
Execution failed for task ':businessMod:generateDebugRelayCode'.
> A failure occurred while executing com.google.d2c.gradle.GenerateCode$GenerateCodeWorkAction
> Converting SVG files: Exception Converting SVG resources for hello_card.
The input line is too long.
The syntax of the command is incorrect.
It looks like some .bat script goes wrong. And I also find the name of my project is C:\Users\User\Desktop\demos\relay-fix-android. Possibly I find the key.
Maybe the name has hyphens - , and command line with those on windows can be interpreted in a wrong way. After that, I just change the project name to a new one without hyphens, and everything works fine.
If anyone has this problem, this solution may be useful.
I have a similar problem and this is the error message I get. I have not been able to resolve it.
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 form_login.
Running into this same exact issue while trying to follow a sample tutorial.
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 news.
I have tried everything from invalidate/restart to using Java 17 to reverting to an older version of the Relay plugin and still this annoying error persists. Absolutely nothing I seem to try affects the error at all.