gpt4 book ai didi

安卓工作室 : always run on all connected devices

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:05:15 25 4
gpt4 key购买 nike

即使我经常插入新设备/移除旧设备,我如何配置 AndroidStudio 以便应用程序在所有连接的设备上运行而无需进一步查询?

请注意,这需要与 this solution 略有不同的方法, 因为在他们的过程中,如果您再次出现设备选择对话框

  • 连接另一台设备

  • 重启 Android Studio

最佳答案

我找到了一个 bash 脚本,它对我来说已经运行了很长一段时间:

adb devices | while read line
do
if [ ! "$line" = "" ] && [ `echo $line | awk '{print $2}'` = "device" ]
then
device=`echo $line | awk '{print $1}'`
echo "$device $@ ..."
adb -s $device $@
fi
done

所有学分归于 github 用户“christopherperry”。有关详细信息,请查看此链接:

https://gist.github.com/christopherperry/3208109

希望这对您有所帮助。

关于安卓工作室 : always run on all connected devices,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30253518/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com