Gradle Error:未找到类异常

时间:2015-06-01 08:05:25

标签: sqlite gradle javafx

如何在项目中添加sqlite驱动程序。我正在用gradle编译一个javafx项目,但它总是卡在驱动程序上。

buildscript {
repositories {
    jcenter()
    mavenCentral()
}

dependencies {
    classpath 'org.javafxports:jfxmobile-plugin:1.0.0-b8'
    classpath 'org.xerial:sqlite-jdbc:3.8.10.1'
    }
}

apply plugin: 'org.javafxports.jfxmobile'

mainClassName = 'myproject.MyProject'
version = '8u40'

repositories {
jcenter()
}

jfxmobile {
ios {
    forceLinkClasses = ['myproject.**.*']
}
android {
    applicationPackage = 'org.javafxports.myproject'
}
}

1 个答案:

答案 0 :(得分:0)

使用gradle将SQLite驱动程序作为依赖项添加到项目中。

最受欢迎的sqlite jdbc驱动程序来自org.xerial并且是available at maven central repository。您可以选择版本并选择标签gradle,将其复制并粘贴到build.gradle。例如:

 'org.xerial:sqlite-jdbc:3.8.9.1'