我正在为我的 Android 应用程序使用 ActiveJDBC,并且我在检测时遇到了问题。
这是我的 build.gradle
apply plugin: 'java'
apply plugin: 'org.javalite.activejdbc'
buildscript {
repositories {
google()
jcenter()
mavenCentral()
maven {url 'http://repo.javalite.io'}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath group: 'org.javalite', name: 'activejdbc-gradle-plugin', version: '2.0'
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven {url 'http://repo.javalite.io'}
}
}
dependencies {
// compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.25'
compile group: 'org.javalite', name: 'activejdbc', version: '2.0'
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.5'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
task run(dependsOn: 'build', type: JavaExec) {
main = 'ph.com.partnersolutions.activejdbforandroidtest.MainActivity'
classpath = sourceSets.main.runtimeClasspath
}
但这不起作用。我做对了吗?