我在两个地方从事一个项目,现在我在家工作,我从 Git 中提取了这个项目。
在工作中,我在 IntelliJ 的外部库中看到了 android.jar 和 jfx.jar(不知道确切的名称),并且这些类可用。然而,在家里,罐子是不可见的,因此无法识别 android 类和 JFXActivity 类。
我现在不知道为什么 Gradle 不加载它,build.gradle 是一样的。
构建.gradle:
buildscript {
repositories {
jcenter()
maven {
url 'http://xxxx.com:8080/artifactory/plugins-release'
}
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.0.8'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:+"
}
}
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'org.javafxports.jfxmobile'
artifactory {
contextUrl = "${artifactory_contextUrl}"
publish {
repository {
repoKey = 'libs-release-local'
maven = true
}
}
resolve {
repository {
repoKey = 'libs-release'
maven = true
}
}
}
repositories {
jcenter()
mavenLocal()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'com.xxxx.scan.application.gluon.MainApplication'
dependencies {
compile 'com.gluonhq:charm:2.1.1'
compile 'com.airhacks:afterburner.mfx:1.6.2'
androidRuntime 'com.gluonhq:charm-android:2.1.1'
iosRuntime 'com.gluonhq:charm-ios:2.1.1'
desktopRuntime 'com.gluonhq:charm-desktop:2.1.1'
compile(group: 'com.essers.pxl2016', name: 'scan-server-definition', version: '0.0.1-SNAPSHOT')
compile(group: 'com.essers.pxl2016', name: 'client', version: '1.0-SNAPSHOT')
compile(group: 'com.essers.pxl2016', name: 'configuration', version: '1.0-SNAPSHOT')
compile('com.google.code.gson:gson:2.2.4')
testCompile "junit:junit:4.12"
}
task print << {
println("$System.env.ANDROID_HOME")
}
jfxmobile {
android {
androidSdk = "$System.env.ANDROID_HOME"
manifest = 'src/android/AndroidManifest.xml'
compileSdkVersion = 21
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'com.xxxx.scan.application.gluon.**.*',
'com.gluonhq.**.*',
'io.datafx.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*'
]
}
}
test {
exclude 'com/xxxx/scan/application/gluon/**'
}