当我在JVM上运行我的java fx(gradle run)时,一切正常,当我在Android设备上启动它时(gradle AndroidInstall),我看到一个黑屏,我在控制台日志中没有任何错误。 我的build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.0.9'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'it.wstech.talco.TAMainApplication'
dependencies {
compile 'com.gluonhq:charm:3.0.0'
compile fileTree(dir: '../mglib/build/libs', include: ['*.jar'])
compile fileTree(dir: '../mglib/lib', include: ['*.jar'])
compile fileTree(dir: '../nowapp/build/libs', include: ['*.jar'])
compile fileTree(dir: '../nowapp/lib', include: ['*.jar'])
compile fileTree(dir: 'lib', include: ['*.jar'])
androidRuntime 'com.gluonhq:charm-android:3.0.0'
iosRuntime 'com.gluonhq:charm-ios:3.0.0'
desktopRuntime 'com.gluonhq:charm-desktop:3.0.0'
embeddedRuntime 'com.gluonhq:charm-desktop:3.0.0'
}
jfxmobile {
android {
manifest = 'src/android/AndroidManifest.xml'
androidSdk="/Users/wstechsrl/Desktop/Android/sdk"
signingConfig {
storeFile file('/opt/modja/workspace-fx/n_talco/softws-keystore')
storePassword 'wstechsrl'
keyAlias 'ws-keystore'
keyPassword 'xxxxx'
}
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'com.gluonhq.**.*',
'io.datafx.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*'
]
}
}
我的控制台:
:compileJava UP-TO-DATE
:compileRetrolambdaMain UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:compileAndroidJava UP-TO-DATE
:compileRetrolambdaAndroid SKIPPED
:compileEmbeddedJava UP-TO-DATE
:compileRetrolambdaEmbedded SKIPPED
:compileTestJava UP-TO-DATE
:compileRetrolambdaTest SKIPPED
:compileRetrolambda UP-TO-DATE
:mergeClassesIntoJar
:validateManifest
:collectMultiDexComponents
:shrinkMultiDexComponents
:createMainDexList
:dex
:mergeAndroidAssets
:mergeAndroidResources
Crunching single PNG file: /opt/modja/workspace-fx/n_talco/src/android/res/mipmap-ldpi/ta_icon.png
Output file: /opt/modja/workspace-fx/n_talco/build/javafxports/tmp/android/resources/res/mipmap-ldpi-v4/ta_icon.png
Crunching single PNG file: /opt/modja/workspace-fx/n_talco/src/android/res/mipmap-hdpi/ta_icon.png
Output file: /opt/modja/workspace-fx/n_talco/build/javafxports/tmp/android/resources/res/mipmap-hdpi-v4/ta_icon.png
Crunching single PNG file: /opt/modja/workspace-fx/n_talco/src/android/res/mipmap-xxhdpi/ta_icon.png
Output file: /opt/modja/workspace-fx/n_talco/build/javafxports/tmp/android/resources/res/mipmap-xxhdpi-v4/ta_icon.png
Crunching single PNG file: /opt/modja/workspace-fx/n_talco/src/android/res/mipmap-xxxhdpi/ta_icon.png
Output file: /opt/modja/workspace-fx/n_talco/build/javafxports/tmp/android/resources/res/mipmap-xxxhdpi-v4/ta_icon.png
Crunching single PNG file: /opt/modja/workspace-fx/n_talco/src/android/res/mipmap-mdpi/ta_icon.png
Output file: /opt/modja/workspace-fx/n_talco/build/javafxports/tmp/android/resources/res/mipmap-mdpi-v4/ta_icon.png
Crunching single PNG file: /opt/modja/workspace-fx/n_talco/src/android/res/mipmap-xhdpi/ta_icon.png
Output file: /opt/modja/workspace-fx/n_talco/build/javafxports/tmp/android/resources/res/mipmap-xhdpi-v4/ta_icon.png
:processAndroidResources UP-TO-DATE
:processAndroidResourcesDebug
:validateSigningDebug
:apkDebug
:zipalignDebug
:androidInstall
Installed on device.
答案 0 :(得分:0)
在应用程序管理器中允许检查清单文件中定义的权限 - >您的应用程序 - >权限。
答案 1 :(得分:0)
您启用了即时游戏吗?这是因为即时运行。 在设置中禁用它并再次运行。
答案 2 :(得分:0)
请检查应用程序图标图像大小。可能图像大小太大,无法通过Android设备处理。如果分辨率大于512 * 512,则处理时间将增加。