Reveal can easily view the layout of the interface in iOS development. It is more convenient to find out that the view (etc.) does not appear or is blocked, which saves a lot of time.
But today Reveal has a problem:A server with the specified hostname could not be found.
Screenshot below:
Google took a look and found an article that might tell the truth about the problem.
There is a sentence in it
The real issue was that I had messed up my /etc/hots file and localhost was broken.
So that is, the hosts file is damaged, then check the hosts file and execute it in the terminal: (It is not a vim party, so I am used to using the open command, the system will call the editor to open)
open /etc/hosts
appear
# SwitchHosts!
# My Hosts
It turns out that the hosts have really been tampered with. Reveal seems to need 127.0.0.1
this port.
So change the hosts file back, as follows (how to change is described later):
# SwitchHosts!
##
# 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
After thinking about it, I discovered that the hosts file was modified a few days ago. The tool used is: SwitchHosts! An open source software that integrates management and switching N Hosts solutions.
SwitchHosts download page -you can choose the latest version to download
Note: It is invalid to modify the hosts file directly. I want to execute su /etc/hosts
it with administrator authority , but it always returns su: Sorry
, but I can modify it directly if I have SwitchHosts, so I don’t pay attention to the issue of this authority.
Modify interface of hosts file
After saving, open Reveal again to find it can be used.
Similar Posts:
- How to Solve ORA-21561 Error: OID generation failed
- Solution of unity package manager error
- Ubuntu solves sudo: Source: command not found error
- How to Solve Warning: Permanently added ‘ 192.168.1.230′(RSA) to the list of known hosts.
- How to operate word batch conversion PDF? Can word be converted to PDF at one time?
- Problems encountered by Fiddler packet capture tool
- Ubuntu sudo: unable to resolve host
- Configuring Google Android test station for Ubuntu
- Could not resolve host: solutions to github.com [How to Solve]
- Tomcat Command Error: Catalina.stop: connect reused solution