0

I have build an app and installed in my android studio emulator. One of the activity contains a recycler view which loads contents from database. The database was in localhost and I fetch the contents using php code. I have used "http://192.168.1.101/fetch.php" to fetch the contents. But the app is not able to load the contents while running in emulator on the other hand when I run it in my android phone it runs smoothly.

I am using WAMP. I can access internet in emulator (checked some websites using chrome etc). But problem occurs in case of this database content retrival.

I am a beginner in app development. So it will be very helpful if you provide the answers in an easily understandable way.

Please help me how to solve these problem..

Jithin Babu
  • 71
  • 1
  • 9
  • There is not enough information here to determine what is happening. What error do you get and where? Is `http://192.168.1.101/fetch.php` accessible through built in browser? BTW if `192.168.1.101` is localhost then you should use `10.0.2.2` https://stackoverflow.com/questions/5528850/how-do-you-connect-localhost-in-the-android-emulator – Ivar Oct 09 '19 at 16:44
  • I have already tried 10.0.2.2 but showing no adapter attached skipping layout.. while loading in emulator – Jithin Babu Oct 09 '19 at 17:00
  • In such case you have to then share the actual code snippet, as small as possible and exception you get. – Ivar Oct 09 '19 at 17:06
  • No other exception showing.. Only " no adapter attached.. skipping layout " – Jithin Babu Oct 09 '19 at 17:13

0 Answers0