Java 如何在google端点中使用protobuf

Java 如何在google端点中使用protobuf,java,protobuf-net,google-cloud-endpoints,Java,Protobuf Net,Google Cloud Endpoints,我正在编写Google Endpoints应用程序,我想在我的@Api类中返回protobuf对象 每次我都会遇到这样的错误: 错误:渐变:任务的执行失败:ExploreBackend:appengineEndpointsGetClientLibs。 运行endpoints命令get client lib时出错:对象类型?不支持扩展xxx.model.proto.MainProtos$PlaceOrBuilder 这是我的代码: @Api( ... ) public class CityApi

我正在编写Google Endpoints应用程序,我想在我的
@Api
类中返回protobuf对象

每次我都会遇到这样的错误:

错误:渐变:任务的执行失败:ExploreBackend:appengineEndpointsGetClientLibs。 运行endpoints命令get client lib时出错:对象类型?不支持扩展xxx.model.proto.MainProtos$PlaceOrBuilder

这是我的代码:

@Api( ... )
public class CityApi {

    public List<MainProto.City> getCities() {
        return new ArrayList<MainProto.City>();
    }
}
@Api(…)
公共类城市{
公共列表(城市){
返回新的ArrayList();
}
}
如何在google端点中使用protobuf

你不能