生成二維碼的問題
生成二維碼那步,為什么我的沒有顯示出捕捉異常?而是The method encode(String, BarcodeFormat, int, int) from the type MultiFormatWriter refers to the missing type BarcodeFormat,怎么解決?
生成二維碼那步,為什么我的沒有顯示出捕捉異常?而是The method encode(String, BarcodeFormat, int, int) from the type MultiFormatWriter refers to the missing type BarcodeFormat,怎么解決?
2016-09-07
舉報
2017-11-19
這個問題是 jar包沒處理好造成的編譯報錯信息
導(dǎo)入zxing的源碼,源碼有一些編譯錯誤信息要處理好,然后再導(dǎo)出jar包,? 這個jar包才算是可以使用的。
2017-06-13
都沒人解答錯誤?
2016-09-21
try{
???BitMatrix bitT=new MultiFormatWriter().encode(content,BarcodeFormat.QR_CODE,width,height,hints);
???Path file=new File("D:/jaja/img.png").toPath();
???MatrixToImageWriter.writeToPath(bitT,format,file);
??}catch(Exception e){
???e.printStackTrace();
??}
?}
出現(xiàn)錯誤說The method encode(String, BarcodeFormat, int, int, Map<EncodeHintType,?>) from the type MultiFormatWriter refers to the missing type BitMatrix
?The method writeToPath(BitMatrix, String, Path) from the type MatrixToImageWriter refers to the missing type BitMatrix
啥情況0.0
?
2016-09-08
try {
BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, width, height,hints);
Path file ?= new File("E:\\img.png").toPath();
FileOutputStream out=new FileOutputStream("E:\\img.png");
MatrixToImageWriter.writeToStream(bitMatrix, format, out);
} catch (Exception e) {
e.printStackTrace();
}