0

I have created a project in Eclipse (Java) with SQLite db. After that, the Eclipse project successfully imported in Android Studio but didn't work with SQLite db. The following error is displayed all the time:

Class Not Found java.lang.ClassNotFoundException: org.sqlite.JDBC.Driver java.sql.SQLException: No suitable driver found for jdbc:sqlite:C:/sqlite/sqlite/db/Student.db

GBouffard
  • 1,125
  • 4
  • 11
  • 24
Renu Sidhu
  • 1
  • 2
  • 2
  • Possible duplicate of [The infamous java.sql.SQLException: No suitable driver found](https://stackoverflow.com/questions/1911253/the-infamous-java-sql-sqlexception-no-suitable-driver-found) – Butiri Dan Oct 03 '19 at 11:44

1 Answers1

0

Your classpath is missing the jar(s) that contain the SQLite classes and driver. You need something like SQLite-JDBC-3.7.2.jar or your applicable version.

If you are sure the jar is there, try adding this line of code before you create a connection:

Class.forName("org.sqlite.JDBC"); 

If not working let me know I will help you.

Gohel Dhaval
  • 820
  • 1
  • 8
  • 12