- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我正在尝试为 Android 设置 Travis。到目前为止,运行构建似乎可以工作,但是在测试时,它会提示“没有连接的设备!”
:app:connectedAndroidTestDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:connectedAndroidTestDebug'.
> com.android.builder.testing.api.DeviceException: java.lang.RuntimeException:
No connected devices!
这是我的 .travis.yml,据我了解,我正在为测试创建并启动一个模拟器,就像 documentation 一样。说。
language: android
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
# - platform-tools
# - tools
# The BuildTools version used by your project
- build-tools-22.0.1
# The SDK version used to compile your project
- android-22
# Additional components
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
# - addon-google_apis-google-19
# - add-on
# - extra
# Specify at least one system image,
# if you need to run emulator(s) during your tests
- sys-img-armeabi-v7a-android-22
# - sys-img-x86-android-17
licenses:
- 'android-sdk-license-.+'
# Emulator Management: Create, Start and Wait
before_script:
- echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a
- emulator -avd test -no-skin -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
你能告诉我我做错了什么以及如何解决它吗?
最佳答案
不幸的是,我不允许发表评论,因为我只想完成 DominicJodoin 的回答。正如 DominicJodoin 所述,正确的缩进和更长的 ADB_INSTALL_TIMEOUT
是必要的。
在我看来,您的模拟器正在运行,但尚未准备好安装 apk。使用 - adb wait-for-device
等待设备连接。根据Documentation这意味着:
Note that this command does not cause adb to wait until the entire system is fully booted. For that reason, you should not prepend it to other commands that require a fully booted system.
尝试在 travis.yml 中用 - android-wait-for-emulator
替换这一行。
Travis.yml
language: android
jdk: oraclejdk7
cache:
directories:
- node_modules
sudo: false
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
# - platform-tools
# - tools
# The BuildTools version used by your project
- build-tools-22.0.1
# The SDK version used to compile your project
- android-22
# Additional components
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
# - addon-google_apis-google-19
# - add-on
# - extra
# Specify at least one system image,
# if you need to run emulator(s) during your tests
- sys-img-armeabi-v7a-android-21
# - sys-img-x86-android-17
licenses:
- 'android-sdk-license-.+'
env:
global:
# install timeout in minutes (2 minutes by default)
- ADB_INSTALL_TIMEOUT=8
# Emulator Management: Create, Start and Wait
before_script:
- echo no | android create avd --force -n test -t android-21 --abi armeabi-v7a
- emulator -avd test -no-skin -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
- android list target
- ./gradlew connectedAndroidTest
关于android - Travis CI Android 测试 : no connected devices,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31264136/
我收到了这样的警告日志,我的构建失败了。 WARNING: We were unable to find a .travis.yml file. This may not be what you wa
我真的很想使用 Travis 而无需将 .travis.yml 存储在我的存储库的根文件夹中。知道它是否可以移动到不同的文件夹中、存储在另一个存储库中或在 Travis 网站上指定吗? 最佳答案 来自
我有 .travis.yml 文件在我的 repo 的根目录中,但 Travis-Ci 不断给我消息: Could not find .travis.yml, using standard confi
每当我推送一个新的提交时,Travis CI 都会使我的构建失败,并在每个日志的顶部显示这条消息: WARNING: We were unable to find a .travis.yml file
我正在尝试登录自己托管的 Travis Enterprise,但通常是 travis login和 travis login --pro正在尝试登录到通常的 Travis SAAS 环境 最佳答案 鉴
我希望在我的 Travis CI 存储库设置中声明环境变量,并在我的 .travis.yml 文件中使用它们来部署应用程序并在 Slack 中发布构建通知。 我在 Travis CI 存储库设置中设置
使用 .travis.yml 时,是否有一个环境变量包含 Travis-CI 中当前构建目录的名称?查看文档 here我没有看到。 最佳答案 您可能需要 $TRAVIS_BUILD_DIR,这是我们在
作为我定制的 travis 构建的一部分,我想使用 Travis command-line client在 after_success 脚本中。在这个特定的 repo 中每次成功构建之后,我需要它来触
我有以下 .travis.yml : sudo: required language: node_js branches: only: - master before_install:
我的本地存储库中有一个有效的 .travis.yml。让我们以 travis 帮助中的示例为例:https://github.com/travis-ci/build-stages-demo/blo
所以,我在 GitHub 上设置为另一个用户拥有的项目的合作者 (我有完全推送权等)。我可以设置 Travis 吗 这个项目?我在“存储库”列表中找不到存储库 特拉维斯。 最佳答案 只有存储库管理员可
每次推送到存储库 Y 时,有没有办法触发存储库 X 的 Travis CI 构建?具体来说,我希望每次推送到 http://github.com/tensorflow/tensorflow 时都开始构
我想针对许多浏览器测试我的 .js 框架的不同版本 我希望写一些类似的东西: language: node_js node_js: - 0.11 env: matrix: - BUILD=
我有一个在 Linux 和 OSX 上运行的 travis 作业,我希望能够使用它为每个平台部署不同的构建工件到 github 版本。我的 .travis.yml文件目前看起来像这样: languag
我在 Travis 文件中有以下部署脚本并面临多行命令问题。我尝试了很多组合,但找不到合适的解决方案。如果我将它提取到文件并从脚本属性调用它,它可以正常工作,但我们的目标是将所有命令作为多行命令放在脚
我在 Travis 文件中有以下部署脚本并面临多行命令问题。我尝试了很多组合,但找不到合适的解决方案。如果我将它提取到文件并从脚本属性调用它,它可以正常工作,但我们的目标是将所有命令作为多行命令放在脚
我正在尝试使用以下配置让 Travis 上传到 PyPI deploy: provider: pypi user: P403n1x87 password: $PYPI_PASSWORD
这是有问题的公共(public)存储库:https://travis-ci.org/agerwick/raw-sinatra-boilerplate 我按照此处的建议集成了 codeclimate 的
在那里,在我的项目中使用travis-ci时遇到了“分段错误”错误:IPython-Dashboard msg没有错误,并且在本地运行良好,我感到有些困惑。任何人都可以提出解决问题的任何想法,谢谢。
我有一个带有子目录 ( test ) 的 gem,其中包含用于测试项目的 Rails 3.1.1 应用程序。我正在尝试设置 Travis-CI 以进行持续集成,但是我不知道如何设置我的 .travis
我是一名优秀的程序员,十分优秀!