These imports are showing error
import javax.jmdns.JmmDNS;
import javax.jmdns.NetworkTopologyDiscovery;
import javax.jmdns.ServiceEvent;
import javax.jmdns.ServiceInfo;
import javax.jmdns.ServiceListener;
import javax.jmdns.impl.NetworkTopologyDiscoveryImpl;
How to clear those errors
If you don't need them, just delete those lines.
If you do need them, import what you need.
Go to your build.gradle (module:app) and under "dependencies" add the libraries you need.
You can also search for those libraries in the Maven Repository.
Here's the example for your first import:
https://mvnrepository.com/artifact/javax.jmdns/jmdns/3.2.2
Under the "Gradle" tab you can see that you can import it by writing: