-2

i was make a app for android devices in basic4android , and i am running wampserver for sql database . but when i use 127.0.0.1 in program code to connect wampserver sql database . i will get error .

what is the right IP in you wave android ?

TasmeTime
  • 5
  • 4
  • possible duplicate of [TCP Client don't work on Android](http://stackoverflow.com/questions/29847088/tcp-client-dont-work-on-android) – Brian White Apr 24 '15 at 14:40
  • If you are testing it on a physical device, you should connect both the wampserver and the device to the same network. The computer running the wampserver should have a **static IP address**. This is the IP address you will use to connect your app to the server. If you will be testing on emulators, then you will have to use the IP address **10.0.2.2** as explained here: https://developer.android.com/tools/devices/emulator.html#emulatornetworking. Please note though, you cannot use your local networks IP address on emulators and you cannot use the 10.0.2.2 IP address on physical devices. – Siddharth Lele Apr 24 '15 at 14:45
  • possible duplicate of [Postgresql not connecting to android using JDBC throwing org.postgresql.util.PSQLException: The connection attempt failed](http://stackoverflow.com/questions/27592881/postgresql-not-connecting-to-android-using-jdbc-throwing-org-postgresql-util-psq) – mkobit Apr 24 '15 at 15:54

1 Answers1

-1

Try using your own IP : 192.168.X.X

Sidd
  • 172
  • 9