Access Webservice localhost - Android Studio

Asked

Viewed 859 times

1

I have a webservice that was made in ASP.NET in Visualstudio 2013, I am running it locally (localhost), and I am not being able to access it in the android emulator of Android Studio, nor on my physical device (USB debugging).

I tried using IP 10.0.2.2 for the standard Android Studio emulator, and 10.0.3.2 for the Genymotion emulator, but I get an exception from java.io.Filenotfoundexception.

Could someone help me with this question?

  • can you put Androidstudio Log? If you try to access URL in the browser? Your app has internet access permission?

  • 1

    Hello Thiago, yes, he has normal permission. I already had this problem in Xamarin, used the emulator of visual studio, and configured it manually, configured the genymotion, and nothing else..

1 answer

3

if you use windows go to cmd and type ipconfig and then the ip that appears on your machine put in place of the local ip 10.0.2.2 your found ip on linux and a similar process just that on the terminal and type ifconfig. Anything to say!

  • Igor, good morning! I already did that too, and it didn’t work. Thank you..

  • 1

    Igor, thanks, it worked out dude. I needed to run visual studio as administrator, now it worked.

  • Good! Just posting to the stack

Browser other questions tagged

You are not signed in. Login or sign up in order to post.