【问题标题】:Error in Travis trying to submit app to Google's Play StoreTravis 尝试将应用程序提交到 Google 的 Play 商店时出错
【发布时间】:2014-10-07 17:39:34
【问题描述】:

我首先查看了我在 Github 上找到的几个 Gists:https://gist.github.com/lpetre/87a5196d14cf4484f1f2

这在我的笔记本电脑上效果很好,但是我正在尝试设置 Travis-CI 以自动构建发布 APK 并将其提交到 Play 商店。我现在遇到的问题是在 Travis 方面,因为我无法使用 pip 安装 google_api_python_client。

在那次通话中,我得到以下信息:

 Installing collected packages: google-api-python-client, httplib2
  Running setup.py install for google-api-python-client
    error: could not create '/usr/local/lib/python2.7/dist-packages/apiclient': Permission denied
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_travis/google-api-python-client/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ctZKCR-record/install-record.txt --single-version-externally-managed --compile:

所以我放弃了使用 pip,自己下载了 python 客户端库,现在将它们包含在我的 git 存储库中(在 /google_api_upload 下)。

Google 的 API 上传客户端库指令的一部分 (https://github.com/googlesamples/android-play-publisher-api/blob/master/v2/python/README.md) 说要在 python 控制台中运行“import apiclient”(同样,在我的笔记本电脑上运行良好,但不是 travis,因为我无法启动 python 会话并且就我发现的情况而言,输入“import apiclient”;它只是挂在 python 会话上)。

然后我认为在我的 gradle 文件中有一个调用 API 函数并从 travis.yml 文件调用的 Gradle 函数会很棒;但我什至不知道这是否可能。

所以任何输入都会有所帮助,特别是:

  • 我尝试在 travis 上运行 pip 时是否搞砸了?我可以 sudo 来提升这个权限吗(我想我不能)
  • 有没有办法在 travis.yml 文件的一行中为 python 调用“import apiclient”?
  • 是否可以让 travis 调用一个 gradle 函数来引用我的构建中包含的客户端库?
  • 我试图找到这种端到端流程的示例,但没有找到适合这种确切情况的示例,您知道吗?

谢谢!

【问题讨论】:

  • 你有没有解决所有这些问题?我也面临着类似的问题。
  • 我收到了 Travis 支持人员的回复,将在下方添加答案

标签: google-api android-gradle-plugin google-api-java-client travis-ci google-play


【解决方案1】:

我有类似的错误信息

error: could not create '/usr/local/lib/python2.7/dist-packages/googleapiclient': Permission denied

并通过添加 sudo:

解决了这个问题
sudo pip install google-api-python-client

比较构建 #162#163

【讨论】:

  • 您将密码安全地存储在哪里?
【解决方案2】:

得到了 Travis 支持人员的回复,但尚未确认。

我相信这是在 https://github.com/travis-ci/travis-ci/issues/2280https://github.com/travis-ci/travis-ci/issues/2280#issuecomment-42798869 建议添加“mvn -pl extras/google-play-services install” 应该做的伎俩。

【讨论】:

  • 如果您回答自己的问题,请将其标记为正确。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-12-01
  • 2018-12-28
  • 1970-01-01
  • 1970-01-01
  • 2019-02-28
  • 1970-01-01
  • 2016-11-17
相关资源
最近更新 更多