2016-04-15 5 views
0

IntelliJでアプリケーションを実行すると画像は表示されますが、Android(6.0 & 4.4.2) 。 ImageオブジェクトはURL(ウェブサイト)でインスタンス化されます。AndroidのJavafxportsは「状態200のJPEGライブラリへの不適切な呼び出し」のため画像を読み込みません

Logcat画像

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); 
     } 
    } 

build.gradle

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 /メイン/リソース/ java.custom.properties

# Solves crash when clicking the menu. 
monocle.stackSize=128000 
をロード

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) 

方法

種類について

+0

AndroidのURLからjpgイメージをロードしてみましたが、動作しています。失敗した画像のリンクを共有できますか?あるいは少なくとも私たちが再現できるものは何ですか? –

+0

Charmプロジェクトとjavafxportsプロジェクトの両方でエラーを再現できませんでした。 – progonkpa

+0

あなたは、もうエラーが出ないのですか? –

答えて

0

問題の原因は画像のファイルサイズのようです。ファイルサイズを縮小した後に画像が表示されました。

関連する問題