Running gradle's connectedAndroidTest on a specific device

后端 未结 5 1408
时光取名叫无心
时光取名叫无心 2020-12-25 13:24

How do you run connectedAndroidTest on a particular device?

I would expect something like:

./gradlew connectedAndroidTest -DconnectedAnd         


        
5条回答
  •  没有蜡笔的小新
    2020-12-25 13:49

    @MotohawkSF's answer did not worked for me in Android Studio terminal. What worked though was using the name of the device after running adb devices

    > adb devices
    List of devices attached
    192.168.22.122:5555    device
    emulator-5554   device
    

    then

    set ANDROID_SERIAL=192.168.22.122:5555
    gradlew someTask
    

提交回复
热议问题