无法运行./gradlew connectedInstrumentTest [英] Cannot run ./gradlew connectedInstrumentTest

查看:366
本文介绍了无法运行./gradlew connectedInstrumentTest的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我成立了Android Studio中一个基本的仪器测试在我的src / androidTest / java文件夹。
现在我想运行这个测试,到处我得到的资料,可致电./gradlew connectedInstrumentTest我的OS X的终端上。但是,这会导致错误的任务connectedInstrumentTest不在项目中找到。结果
如果我看./gradlew任务未列出仪器的任务。我必须在我的项目/的build.gradle设置别的吗?没有教程或实况告诉我这样做,所以我有点糊涂了。结果
有没有人对于一个解释?结果
干杯结果
ķ。

I set up a basic instrument test in Android Studio in my src/androidTest/java folder. Now I want to run this test and everywhere I get the information to call ./gradlew connectedInstrumentTest on my OS X terminal. But that results in an error "Task 'connectedInstrumentTest' not found in project".
If I look at ./gradlew tasks the instrument task is not listed. Do I have to set anything else up in my project/build.gradle? No tutorial or docu tells me to do so, so I'm a bit confused.
Has anyone an explanation for that?
Cheers
K.

推荐答案

如果您使用的是新的插件版本0.9,则任务名称现在是 connectedAndroidTest

If you are using the new plugin version 0.9, then the task name is now connectedAndroidTest.

您应该只需要调用 connectedCheck 虽然一个它会调用它自动可能包括其他测试。

You should just call connectedCheck though an it'll call it automatically including possibly other tests.

这篇关于无法运行./gradlew connectedInstrumentTest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆