【问题标题】:Google Cloud Endpoints 2.0 with gradle-appengine-plugin带有 gradle-appengine-plugin 的 Google Cloud Endpoints 2.0
【发布时间】:2017-08-07 13:22:02
【问题描述】:

在尝试使用 gradle appengine plugin 升级到 Google Cloud Endpoints 2.0 时,我遇到了与配置 endpoints 的冲突。 Gradle 报错:

Error:Cannot add a configuration with name 'endpoints' as a configuration with that name already exists.

切换到较新的appengine gradle plugin 可以避免这个问题,除了它 (1) 不支持 Android Studio,(2) 并且具有糟糕的 JDO 支持 (upgrade doc)。

有没有人可以将旧插件与 Google Cloud Endpoints 2.0 一起使用?

【问题讨论】:

  • 你读过这个过渡过程吗? github.com/GoogleCloudPlatform/…
  • 一般来说这是可行的。听起来更像是您的 Gradle 配置的问题。您可以发布您的 build.gradle 文件。由于某种原因,较新的插件仍然与 Android Studio 不兼容(不仅仅是不支持,它根本不起作用),不要去那里。

标签: google-app-engine gradle google-cloud-endpoints google-cloud-endpoints-v2 appengine-gradle-plugin


【解决方案1】:

出现问题是因为 V2 endpoints-framework-gradle-plugingradle-appengine-plugin 都包含名为 endpoints 的任务。删除 V2 插件不起作用,因为 gradle-appengine-plugin 版本不支持 V2 Cloud Endpoints。

最后,我不得不按照Android upgrade doc 中的建议迁移到新的 appengine gradle 插件。这需要从命令行构建和部署以及处理 JDO 的自定义任务,但其他工作正常。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-07-13
    • 1970-01-01
    • 1970-01-01
    • 2017-11-29
    • 1970-01-01
    • 2013-10-14
    • 1970-01-01
    相关资源
    最近更新 更多