Skip to content Skip to sidebar Skip to footer

Load The Mysql Driver In Android Emulator

how to load the mysql server in android emulator i.e Class.forName('com.mysql.jdbc.Driver') i got the exception java.land.ClassNotFoundException in com.mysql.jdbc.Drive please rep

Solution 1:

This assumes MySQL is publicly available from internet, but it is never good idea .

Setup public WebService and connect to it from mobile application.


Solution 2:

You won't be able to run MySQL server on an Android device.

What you're doing, however, is trying to load the MySQL client library. That isn't included as part of Android so you cannot load it. You'd need to include the relevant JARs in your project, if you really do want to connect to a remote MySQL database from an Android app.

If you do want to store and access data on your Android device, the awesome SQLite database is included by default, including all the APIs you need to create, upgrade and otherwise interact with SQLite databases.


Solution 3:

When I did this I created PHP files for the database operations. I sent data in XML and received data in XML all using PHP scripts. I found this to be the easiest way for me...but you need to know PHP of course.


Post a Comment for "Load The Mysql Driver In Android Emulator"