title: JDBC connection in Android
body: <p>Is there anyone who tried JDBC connection in android because in Android 2.3 JDBC is supported.</p>
  
  <p>I have to connect with Mysql without web service.</p>
  
  <p>I have made application but it gives me error</p>
  
  <pre><code>public class MysqlConnect extends Activity{
  @Override
  public void onCreate(Bundle savedInstanceState) {
  
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  System.out.println("MySQL Connect Example.");
  Connection conn = null;
  String url = "jdbc:mysql://localhost:3306/";
  String dbName = "jdbctutorial";
  String driver = "com.mysql.jdbc.Driver";
  String userName = "root"; 
  String password = "root";
  try {
    Class.forName(driver).newInstance();
    conn = DriverManager.getConnection(url+dbName,userName,password);
    System.out.println("Connected to the database");
    conn.close();
    System.out.println("Disconnected from database");
  } catch (Exception e) {
    e.printStackTrace();
  }
  }
  }
  </code></pre>
  
  <p>i am getting error in getConnection. error is like java.lang.VerifyError : com.mysql.jdbc.MysqlIO</p>
  
  <p>Thanks in advance.</p>