0%

修复Mac Android Studio无法调试问题

概述

Mac版Android Studio调试,提示Invalid argument : Argument invalid [port]
搜索得到解决方案,原因是找不到localhost,在/etc/hosts中配置即可(之前不小心覆盖了)

配置

sudo vim /etc/hosts

1
2
3
4
5
6
7
8
9
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost

参考

Android Studio因为hosts变更无法debug调试问题