第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

生成二維碼的問題

生成二維碼那步,為什么我的沒有顯示出捕捉異常?而是The method encode(String, BarcodeFormat, int, int) from the type MultiFormatWriter refers to the missing type BarcodeFormat,怎么解決?

正在回答

4 回答

這個問題是 jar包沒處理好造成的編譯報錯信息

導(dǎo)入zxing的源碼,源碼有一些編譯錯誤信息要處理好,然后再導(dǎo)出jar包,? 這個jar包才算是可以使用的。

0 回復(fù) 有任何疑惑可以回復(fù)我~

都沒人解答錯誤?

0 回復(fù) 有任何疑惑可以回復(fù)我~

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

?

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

名字要牛逼

LZ,你解決了嗎,我也遇到了
2017-06-01 回復(fù) 有任何疑惑可以回復(fù)我~

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

}


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

qq_BullshitGame_0 提問者

hints.put(EncodeHintType.MARGIN, 2); 這句 顯示錯誤說 put重名了? 前面還有2行代碼 是hints.put(EncodeHintType.CHARACTER_SET, "utf-8"); hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.M); 怎么回事?
2016-09-08 回復(fù) 有任何疑惑可以回復(fù)我~
#2

qq_BullshitGame_0 提問者

寫中文的時候 掃描是亂碼 版本問題嗎?
2016-09-08 回復(fù) 有任何疑惑可以回復(fù)我~
#3

qq_習(xí)慣就好_11 回復(fù) qq_BullshitGame_0 提問者

點擊編寫的類,右鍵->properties->other改為utf-8試試
2016-09-09 回復(fù) 有任何疑惑可以回復(fù)我~
#4

qq_BullshitGame_0 提問者 回復(fù) qq_習(xí)慣就好_11

!!! 注析 變亂碼了.!
2016-09-10 回復(fù) 有任何疑惑可以回復(fù)我~
查看1條回復(fù)

舉報

0/150
提交
取消
Java生成二維碼
  • 參與學(xué)習(xí)       84566    人
  • 解答問題       279    個

二維碼無處不在,自己動手用Java生成二維碼,三種生成方式任你選

進入課程

生成二維碼的問題

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號