0

I got a problem using MySQL with MonkeyRunner, need a help with MySQL Driver Name. The starting of my script is:

#coding : utf-8

from com.android.monkeyrunner import MonkeyRunner,MonkeyDevice
from com.ziclix.python.sql import zxJDBC

db = zxJDBC.connect('jdbc:mysql://localhost/android','dani','123456','com.mysql.jdbc.Driver')
.
.
etc

Each time I got an error that com.mysql.jdbc.Driver not found even when using org.git.mm.mysql.Driver. I set classpath as following :

export CLASSPATH=$CLASSPATH:/usr/share/java/mysql-connector-java.5.1.10.jar

Any tips or hits?

Regards,,,

Angry-d
  • 87
  • 1
  • 2
  • 12

1 Answers1

0

You need to include the relevant jar in the correct location. There should be a libs folder where you need to put the jar. It should be in the top level of your project folder, at the same level as the src and res folders.

David
  • 19,577
  • 28
  • 108
  • 128
  • You mean if my project in /home/..../Project The I need to create a file /home/..../Project/lib and put that jar inside? – Angry-d Apr 15 '13 at 11:02
  • Take a look at the top answer here, it explains where to put the jar http://stackoverflow.com/questions/1334802/how-can-i-use-external-jars-in-an-android-project – David Apr 15 '13 at 11:16