gradlew command line - ignore devices

1.1k views Asked by At

I have a machine we are using for automated builds on our android application while its in development. That machine is connected to multiple android devices which need to stay connected for other purposes outside the scope of this project. That said, I am using the command line:

./gradlew clean installMonkeytalk 

to make a monkey talk integrated build of our project. This fails with the error :

error: more than one device and emulator - waiting for device -

My question: Is there a way to make the build without deploying to a device or emulator, so that it makes the MonkeyTalk integrated apk but ignores all connected devices?

1

There are 1 answers

0
Scott Barta On

You're running an install tasks, which will look for connected devices or emulators to install to. If you run an assemble task instead, e.g.:

./gradlew clean assemble

then it should do what you want.

Note that you can abbreviate task names in Gradle if they're unambiguous; you don't need to spell out all of "assemble". I usually shorten it to this, which is one of my favorite command lines in recent memory:

./gradlew clean ass