问题描述
我在 android 中为 SQLConnection 使用以下代码:
I am using following code for SQLConnection in android:
我已经包含了 net.sourceforge.jtds.jdbc.Driver
,如下所示:
I have included net.sourceforge.jtds.jdbc.Driver
as we can see below :
堆栈跟踪:
请帮帮我.
推荐答案
如果你已经添加了jtds-1.2.5驱动就好了.否则:
If you have already added the jtds-1.2.5 driver, good. Otherwise:
右键单击项目 > 属性 > 库选项卡通过单击添加外部 JAR"添加 jtds-1.2.5.jar 文件
Right click on the Project > Properties > Libraries Tab Add the jtds-1.2.5.jar file by clicking on "Add External JARs"
接下来,在 Order and Export 选项卡(Java Build Path 窗口中的 Libraries 旁边)选中 jtds-1.2.5.jar(以及您可能拥有的任何其他外部 jar)的复选框.
Next, in the Order and Export tab (Right next to Libraries in the Java Build Path window) check the box for jtds-1.2.5.jar (and any other external jars you might have).
这将使用 .apk 文件导出包含驱动程序的 .jar.
This will export the .jar containing the driver with the .apk file.
这篇关于类在android中找不到异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!