Error:Execution failed for task ':backend:appengineEndpointsGetClientLibs

隐身守侯 提交于 2019-12-05 18:16:12

问题


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)


回答1:


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.



来源:https://stackoverflow.com/questions/29599143/errorexecution-failed-for-task-backendappengineendpointsgetclientlibs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!