Mobile Android上的Javafxports赢得了';t由于“错误”而加载图像;不正确地调用状态为200的JPEG库”;
当我使用IntelliJ运行应用程序时,图像是可见的,但当移植到Android(6.0和4.4.2)时,图像不是可见的。图像对象用URL(网站)实例化 LogcatMobile Android上的Javafxports赢得了';t由于“错误”而加载图像;不正确地调用状态为200的JPEG库”;,mobile,javafx,javafxports,gluon,Mobile,Javafx,Javafxports,Gluon,当我使用IntelliJ运行应用程序时,图像是可见的,但当移植到Android(6.0和4.4.2)时,图像不是可见的。图像对象用URL(网站)实例化 Logcat W/linker: /data/app/com.xxxx.xxxx.scan.application.scanner-2/lib/arm/libjavafx_iio.so: is missing DT_SONAME will use basename as a replacement: "libjavafx_iio.so" W/Sy
W/linker: /data/app/com.xxxx.xxxx.scan.application.scanner-2/lib/arm/libjavafx_iio.so: is missing DT_SONAME will use basename as a replacement: "libjavafx_iio.so"
W/System.err: java.io.IOException: Improper call to JPEG library in state 200
//##The error below is thrown at the new Image(url) operation
W/System.err: at com.xxxx.xxxx.scan.application.scanner.controllers.ProductController.updateImageView(ProductController.java:117)
方法加载图像
private synchronized void updateImageView(ProductEntry product) {
if (product.getExtraInfo() != null && product.getExtraInfo().size() > 0) {
ExtraInfo extraInfo = product.getExtraInfo().get(0);
figLabel.setText(extraInfo.getInfo());
image = new Image(extraInfo.getUrl());
imageView.fitHeightProperty().bind(pane.heightProperty());
imageView.fitWidthProperty().bind(pane.widthProperty());
imageView.setPreserveRatio(true);
// imageView.setSmooth(true);
// imageView.setCache(true);
imageView.setImage(image);
}
}
格雷德尔先生
buildscript {
repositories {
jcenter()
maven {
url 'http://xxxx.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: 'org.javafxports.jfxmobile'
apply plugin: "com.jfrog.artifactory"
artifactory {
contextUrl = "${artifactory_contextUrl}"
publish {
repository {
repoKey = 'libs-release-local'
maven = true
}
}
resolve {
repository {
repoKey = 'libs-release'
maven = true
}
}
}
repositories {
jcenter()
mavenLocal()
}
mainClassName = 'com.essers.pxl2016.scan.application.scanner.MainApplication'
dependencies {
compile(group: 'com.essers.pxl2016', name: 'scan-server-definition', version: '0.0.1-SNAPSHOT')
compile(group: 'com.xxxx.xxxx', name: 'client', version: '1.0-SNAPSHOT')
compile('com.google.code.gson:gson:2.2.4')
testCompile "junit:junit:4.12"
}
jfxmobile {
javafxportsVersion = '8.60.7'
ios {
forceLinkClasses = ['com.xxxx.xxxx.scan.**.*']
}
android {
applicationPackage = 'com.xxxx.xxxx.scan.application.scanner'
}
}
test {
exclude 'com/xxxx/xxxx/scan/application/scanner/**'
}
src/main/resources/java.custom.properties
# Solves crash when clicking the menu.
monocle.stackSize=128000
问题的原因似乎是图像的文件大小。图像在减小文件大小后显示。我刚刚在Android上测试了从URL加载jpg图像,效果良好。你能分享失败图像的链接吗?或者至少是我们可以复制的任何东西?我无法复制Charm和javafxports项目的错误。你是什么意思,你不再收到错误了吗?我目前正在处理的项目中仍然存在错误,该项目是一个JavaFX应用程序,其build.gradle来自gluonhq,具有我自己的其他配置。当我试图在一个新的Gluon Mobile项目中重现这个错误,该项目使用IntelliJ插件创建了多个视图和FXML,结果成功了。当我从gluonhq.com用build.gradle创建一个新的JavaFX项目时,它也起到了作用。然后,您需要隔离项目中的失败之处。也许这与jpg图像本身无关,而是另一个不同的问题。