Google Play商店的Azure Devops Android版本失败

Google Play商店的Azure Devops Android版本失败

Google Play商店的Azure Devops Android版本失败

Google Play商店的Azure Devops Android版本失败

xamarin.android的发布管道失败。此版本中有一项任务:

发布到Google Play商店

  • 我已经从开发者播放控制台添加了JSON文件
  • 工件的APK文件路径。
  • 并指定了软件包名称。

失败,并显示以下消息:

2020-06-26T14:40:02.8690362Z ## [错误] System.Management.Automation.RemoteException:追溯(最近一次通话为最后一次): 2020-06-26T14:40:02.8692807Z ## [错误] System.Management.Automation.RemoteException:文件“ D:\ a_tasks \ publishPlaystore_20810fda-9c24-482a-a00c-6fcc16b30fd0 \ 1.0.1 \ upload_apks_with_listing.py ”,位于 2020-06-26T14:40:02.8693469Z 来自oauth2client导入工具 2020-06-26T14:40:02.8693671Z ModuleNotFoundError:没有名为'oauth2client'的模块

完整日志在这里:

2020-06-26T14:39:15.5941331Z ==============================================================================
2020-06-26T14:39:15.5941643Z Task         : Publish to Google Play Store
2020-06-26T14:39:15.5941916Z Description  : Publish your APK to Google Play Store (Alpha,Beta,Production or Rollout)
2020-06-26T14:39:15.5942148Z Version      : 1.0.1
2020-06-26T14:39:15.5942322Z Author       : Alexandre Chohfi
2020-06-26T14:39:15.5943117Z Help         : [More Information](https://github.com/azchohfi/vsts-task-publish-playstore)
2020-06-26T14:39:15.5943433Z ==============================================================================
2020-06-26T14:39:15.6000016Z ##[warning]Task 'publishPlaystore' (1.0.1) is using deprecated task execution handler. The task should use the supported task-lib: https://aka.ms/tasklib
2020-06-26T14:39:15.6009131Z Preparing task execution handler.
2020-06-26T14:39:32.5231135Z Executing the powershell script: D:\a\_tasks\publishPlaystore_20810fda-9c24-482a-a00c-6fcc16b30fd0\1.0.1\publish.ps1
2020-06-26T14:39:32.8402613Z com.healthbit.app
2020-06-26T14:39:32.8407837Z D:\a\r1\a/_Healthbit Master-Xamarin.Android-CI/drop/com.healthbit.app.apk
2020-06-26T14:39:33.3275969Z Python 3.7.7
2020-06-26T14:39:33.3276966Z C:\hostedtoolcache\windows\Python\3.7.7\x64\python.exe
2020-06-26T14:39:33.3277344Z C:\hostedtoolcache\windows\Python\3.7.7\x64\scripts\pip.exe
2020-06-26T14:39:42.4806332Z Collecting pip
2020-06-26T14:39:42.5276657Z   Downloading pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
2020-06-26T14:39:43.1169997Z Collecting wheel
2020-06-26T14:39:43.1231804Z   Downloading wheel-0.34.2-py2.py3-none-any.whl (26 kB)
2020-06-26T14:39:43.1986490Z Installing collected packages: pip,wheel
2020-06-26T14:39:43.1986964Z   Attempting uninstall: pip
2020-06-26T14:39:43.1993275Z     Found existing installation: pip 20.1.1
2020-06-26T14:39:46.2729697Z     Uninstalling pip-20.1.1:
2020-06-26T14:39:46.2925429Z       Successfully uninstalled pip-20.1.1
2020-06-26T14:39:49.9060249Z Successfully installed pip-20.1.1 wheel-0.34.2
2020-06-26T14:39:50.6454675Z Collecting google-api-python-client
2020-06-26T14:39:50.6739591Z   Downloading google_api_python_client-1.9.3-py3-none-any.whl (59 kB)
2020-06-26T14:39:50.7797649Z Collecting google-auth-httplib2>=0.0.3
2020-06-26T14:39:50.7860607Z   Downloading google_auth_httplib2-0.0.3-py2.py3-none-any.whl (6.3 kB)
2020-06-26T14:39:50.9207074Z Collecting google-auth>=1.16.0
2020-06-26T14:39:50.9295217Z   Downloading google_auth-1.18.0-py2.py3-none-any.whl (90 kB)
2020-06-26T14:39:51.0565346Z Collecting six<2dev,>=1.6.1
2020-06-26T14:39:51.0679431Z   Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
2020-06-26T14:39:51.1535589Z Collecting uritemplate<4dev,>=3.0.0
2020-06-26T14:39:51.1595257Z   Downloading uritemplate-3.0.1-py2.py3-none-any.whl (15 kB)
2020-06-26T14:39:51.2806441Z Collecting google-api-core<2dev,>=1.18.0
2020-06-26T14:39:51.2900495Z   Downloading google_api_core-1.21.0-py2.py3-none-any.whl (90 kB)
2020-06-26T14:39:51.4234837Z Collecting httplib2<1dev,>=0.9.2
2020-06-26T14:39:51.4322339Z   Downloading httplib2-0.18.1-py3-none-any.whl (95 kB)
2020-06-26T14:39:51.5281857Z Collecting cachetools<5.0,>=2.0.0
2020-06-26T14:39:51.5358573Z   Downloading cachetools-4.1.0-py3-none-any.whl (10 kB)
2020-06-26T14:39:51.6647838Z Collecting rsa<5,>=3.1.4; python_version >= "3"
2020-06-26T14:39:51.6721504Z   Downloading rsa-4.6-py3-none-any.whl (47 kB)
2020-06-26T14:39:51.7388718Z Requirement already satisfied,skipping upgrade: setuptools>=40.3.0 in c:\hostedtoolcache\windows\python\3.7.7\x64\lib\site-packages (from google-auth>=1.16.0->google-api-python-client) (41.2.0)
2020-06-26T14:39:51.8327957Z Collecting pyasn1-modules>=0.2.1
2020-06-26T14:39:51.8392193Z   Downloading pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
2020-06-26T14:39:52.0387337Z Collecting requests<3.0.0dev,>=2.18.0
2020-06-26T14:39:52.0467660Z   Downloading requests-2.24.0-py2.py3-none-any.whl (61 kB)
2020-06-26T14:39:52.1511827Z Collecting googleapis-common-protos<2.0dev,>=1.6.0
2020-06-26T14:39:52.1590625Z   Downloading googleapis_common_protos-1.52.0-py2.py3-none-any.whl (100 kB)
2020-06-26T14:39:52.3786714Z Collecting protobuf>=3.12.0
2020-06-26T14:39:52.3881114Z   Downloading protobuf-3.12.2-cp37-cp37m-win_amd64.whl (1.0 MB)
2020-06-26T14:39:52.7079539Z Collecting pytz
2020-06-26T14:39:52.7150406Z   Downloading pytz-2020.1-py2.py3-none-any.whl (510 kB)
2020-06-26T14:39:53.4366923Z Collecting pyasn1>=0.1.3
2020-06-26T14:39:53.4460062Z   Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
2020-06-26T14:39:53.5813789Z Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
2020-06-26T14:39:53.5879323Z   Downloading urllib3-1.25.9-py2.py3-none-any.whl (126 kB)
2020-06-26T14:39:53.7408810Z Collecting chardet<4,>=3.0.2
2020-06-26T14:39:53.7481648Z   Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
2020-06-26T14:39:53.8918463Z Collecting certifi>=2017.4.17
2020-06-26T14:39:53.8978979Z   Downloading certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
2020-06-26T14:39:53.9964691Z Collecting idna<3,>=2.5
2020-06-26T14:39:54.0035221Z   Downloading idna-2.9-py2.py3-none-any.whl (58 kB)
2020-06-26T14:39:54.1249759Z Installing collected packages: cachetools,pyasn1,rsa,pyasn1-modules,six,google-auth,httplib2,google-auth-httplib2,uritemplate,urllib3,chardet,certifi,idna,requests,protobuf,googleapis-common-protos,pytz,google-api-core,google-api-python-client
2020-06-26T14:40:01.9193298Z Successfully installed cachetools-4.1.0 certifi-2020.6.20 chardet-3.0.4 google-api-core-1.21.0 google-api-python-client-1.9.3 google-auth-1.18.0 google-auth-httplib2-0.0.3 googleapis-common-protos-1.52.0 httplib2-0.18.1 idna-2.9 protobuf-3.12.2 pyasn1-0.4.8 pyasn1-modules-0.2.8 pytz-2020.1 requests-2.24.0 rsa-4.6 six-1.15.0 uritemplate-3.0.1 urllib3-1.25.9
2020-06-26T14:40:02.8690362Z ##[error]System.Management.Automation.RemoteException: Traceback (most recent call last):
2020-06-26T14:40:02.8692807Z ##[error]System.Management.Automation.RemoteException:   File "D:\a\_tasks\publishPlaystore_20810fda-9c24-482a-a00c-6fcc16b30fd0\1.0.1\upload_apks_with_listing.py",line 27,in <module>
2020-06-26T14:40:02.8693469Z     from oauth2client import tools
2020-06-26T14:40:02.8693671Z ModuleNotFoundError: No module named 'oauth2client'
2020-06-26T14:40:02.8693816Z 
2020-06-26T14:40:02.9026231Z ##[error]PowerShell script completed with 2 errors.
2020-06-26T14:40:02.9035336Z ##[section]Finishing: Publish  to Google Play Store
iCMS 回答:Google Play商店的Azure Devops Android版本失败

从错误日志中,ModuleNotFoundError: No module named 'oauth2client'似乎是此问题的根本原因。

缺少oauth2client模块。

要解决此问题,您可以在Command Line task任务之前添加Publish to Google Play Store

然后您可以运行脚本进行安装。

steps:
- script: 'pip install -t {path}  google-api-python-client oauth2client'

这是我引用的the ticket

希望这会有所帮助。

本文链接:https://www.f2er.com/2050352.html

大家都在问