错误:任务执行失败::backend:appengineEndpointsGetClientLibs [英] Error:Execution failed for task ':backend:appengineEndpointsGetClientLibs

查看:114
本文介绍了错误:任务执行失败::backend:appengineEndpointsGetClientLibs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Google将Google Cloud Endpoint后端添加到Android应用时App Engine Java模块模板,两个类别(除其他外)都添加到项目中。

然后鼓励我们根据自己的要求修改这些类。所以,我决定删除模型类(MyBean)和端点类(MyEndpoint),并将它们替换为我自己的类。当我尝试重建/清理项目时,出现以下错误消息:

 错误:执行失败,执行任务':backend: appengineEndpointsGetClientLibs'。 
运行endpoints命令时出错get-client-lib:
< package-name> .MyEndpoint

我找了几个小时解决这个问题,直到我找到原因。所以我决定分享它,因为这个问题甚至不存在于SO(如果我错了,请纠正我) \\ web.xml



在web.xml文件中,查找 init-param ,并将参数值更改为刚刚添加的新端点类。

 < init-param> 
< param-name>服务< / param-name>
< param-value> com.mycompany.backend.New-Endpoint-Class-Name< / param-value>
< / init-param>

重建项目,一切都应该没问题。


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.

这篇关于错误:任务执行失败::backend:appengineEndpointsGetClientLibs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆