NoClassDefFoundError Exception on Android

62 views
Skip to first unread message

tasos GR

unread,
May 24, 2017, 9:50:49 AM5/24/17
to Xerial
I'm trying to use xerial sqlite-jdbc to manage my database in Android with no success.I'm getting an java.lang.NoClassDefFoundError: org.sqlite.SQLiteConnection exception.I've imported this dependency 'org.xerial:sqlite-jdbc:3.18.0' in my gradle and my code is as follows,

try {

       
Class.forName("org.sqlite.JDBC");
       
Connection connection = DriverManager.getConnection("jdbc:sqlite:handhelds.db");

   
} catch (ClassNotFoundException eString) {System.err.println("Could not init JDBC driver - driver not found");
   
} catch (java.sql.SQLException e) {e.printStackTrace();}

Any hints about this?
Reply all
Reply to author
Forward
0 new messages