Google Relay in Android Studio, com.google.d2c.gradle.GenerateCode$GenerateCodeWorkAction Failure

36 Views Asked by At

I have implemented the Relay tutorial provided by Google https://developer.android.com/jetpack/compose/tooling/relay. It's a great tool, the tutorial worked with no problem. I even added it to a new project and it worked with no problem.

I then tried implementing it on a much larger project made up of many modules but am getting the following error on build:


Execution failed for task ':local-ui:generateGoogleDebugRelayCode'.
> A failure occurred while executing com.google.d2c.gradle.GenerateCode$GenerateCodeWorkAction
   > 'com.google.gson.JsonElement com.google.gson.JsonParser.parseReader(java.io.Reader)'

and

Unable to find method ''com.google.gson.JsonElement com.google.gson.JsonParser.parseReader(java.io.Reader)''
'com.google.gson.JsonElement com.google.gson.JsonParser.parseReader(java.io.Reader)'

I have tried adding it to the main app module, and then in a sub-module but had the same error in both.

I have also tried adding implementation 'com.google.code.gson:gson:2.10' to the module's build.gradle file

If anyone has any ideas on what could cause this and how to resolve I would be appreciative, Thank you!

0

There are 0 best solutions below