When adding a Google Cloud Endpoint backend to a Android app using the Google App Engine Java Module Template, two classes (amongst other things) are added to the project.
We are then encouraged to modify these classes to our own requirements. So, I decided to delete the model class (MyBean) and the endpoint class (MyEndpoint) and replace them with my own classes. When I tried to rebuild/clean the project, I get the error message:
Error:Execution failed for task ':backend:appengineEndpointsGetClientLibs'.
There was an error running endpoints command get-client-lib:
<package-name>.MyEndpoint
I looked for a couple of hours for a solution to this problem until I found the cause.So I decided to share it since this question does not even exist on SO (Please correct me if I am wrong)
Go to backend\src\main\webapp\WEB-INF\web.xml
In the web.xml file, look for the init-param
and change the parameter value to the new endpoint class you've just added.
<init-param>
<param-name>services</param-name>
<param-value>com.mycompany.backend.New-Endpoint-Class-Name</param-value>
</init-param>
Rebuild the project and everything should be just fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With