简体   繁体   中英

How can I connect to the database?

I am developing an Android native application in Eclipse using Java and I added that MySQL connector for Java. I want to display data from database in mobile emulator. I'm unable to connect to the database.

You didn't say how you're connecting to the database, but the docs about networking in the Android emulator may be of some help. In particular, if the database is running on the machine that is also running the emulator then configure the app to connect to the IP address 10.0.2.2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM