ruby - 在 META-INF 中找不到签名文件。无法继续(运行时错误)
问题描述
我正在尝试使用 calabash-android 在 android studio 的手机上启动测试服务器。我是新手,感谢教程。
我下载了 java、ruby、calabash-android,设置环境变量,在 中创建了一个密钥库,在我的文件夹中.calabash-settings
有一个文件。.debug-keystore
.android
我不知道这个问题是什么我可以正常运行,bundle exec calabash-android resign app-debug.apk
但是当我这样做时bundle exec calabash-android run app-debug.apk
,我收到以下错误消息。我显然错过了一些东西,但我不确定是什么:
C:\Users\Dell\AndroidStudioProjects\Calabash>bundle exec calabash-android build app-debug.apk
WARNING: skipped META-INF/CERT.RSA as unsafe
Traceback (most recent call last):
8: from C:/Ruby26-x64/bin/calabash-android:23:in `<main>'
7: from C:/Ruby26-x64/bin/calabash-android:23:in `load'
6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/calabash-android-0.5.14/bin/calabash-android:76:in `<top (required)>'
5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/calabash-android-0.5.14/bin/calabash-android-build.rb:2:in `calabash_build'
4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/calabash-android-0.5.14/lib/calabash-android/helpers.rb:162:in `fingerprint_from_apk'
3: from C:/Ruby26-x64/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/calabash-android-0.5.14/lib/calabash-android/helpers.rb:163:in `block in fingerprint_from_apk'
1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/calabash-android-0.5.14/lib/calabash-android/helpers.rb:163:in `chdir'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/calabash-android-0.5.14/lib/calabash-android/helpers.rb:177:in `block (2 levels) in fingerprint_from_apk': **No signature files found in META-INF. Cannot proceed. (RuntimeError)**
解决方案
我在 ruby (v3.0.2p107) 和 calabash (v0.9.22) 的最新可用版本中遇到了同样的问题。
我通过使用“bundle install”命令并使用以前版本指定 GemFile 来避免这个问题。
# Contents of Gemfile
source "https://rubygems.org"
ruby "2.5.1"
gem 'calabash-android', '0.9.5'
gem 'cucumber'
gem 'rexml'
gem 'rubyzip', '1.2.1'
您可能想参考提出的类似问题,例如https://github.com/calabash/calabash-android/issues/802
推荐阅读
- algorithm - 将二叉树的有序访问保存在数组中
- python - 强制从 URL 下载图像的最长时间
- python - Python3 中的惰性求值
- javascript - React 钩子在 Gatsby 组件中不起作用
- php - 如何处理项目中经常使用的字符串?
- scala - 在 Sring Boot 中使用替代方法运行重载的 Methode 值
- css - 如何实现具有居中元素但没有中间/周围空间的 flex 布局?
- javascript - 未找到 NPM 模块 - Puppeteer
- kubernetes - kubernetes:如何设置“top node”和“top pod”权限?
- angular - HighCharts Angular 8 | FireFox 和 IE 的 yAxis 问题