Connect Kotlin to mysql server on localhost

I have tired using different methods of connecting my android App written in Kotlin to a localhost of mysql server but it’s not working…any suggestions?

Try localtest.me instead of localhost :wink:

Edit: Maybe you should set the MySql server ip, is localhost the Android device?

localtest.me doesn’t work. Am running the App on an android emulator. The database is on a different machine.

If the database is on a different machine you will have to use the IP of that machine, localhost refers to the current machine.