9/19/2023 0 Comments Android studio mac![]() Now launch your emulator with emulator -dns-server 8.8.8.8 command from the terminal which forces the emulator to use 8.8.8.8 as its DNS and the emulator will have internet. So the trick is that you have your google DNS(8.8.8.8) configured in your network settings after your default router settings - this part takes care of downloading the dependencies from jcenter() and the sync and build succeeds. But if i change the DNS in my network settings, the google-services plugin which fetches your dependencies especially the one's getting downloaded from jcenter() will not be downloaded and hence your sync will fail which eventually fails your build. The problem is when you are connected through the router, the androidwifi in your emulator uses the settings and the sets the DNS to something other than 8.8.8.8 which is the google DNS(I presume this is kinda mandatory setting for the androidwifi to gain internet access). I hope it works for : I figured the problem with this and fixed it. This fixed it for me after I unsuccessfully tried all the other solutions found on this page and many others. Close the emulator and restart it using the Cold Boot Now option.Then enter the IP address and Gateway that you wrote down in step 2. Click the IP settings dropdown and change it to Static. Click the pencil icon on the top to edit the Network details.We need those IP addresses to fill in as static. Write down (or remember) the IP address and Gateway address displayed there in the network settings. ![]() If it is NOT 8.8.8.8, follow this to fix.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |