報(bào)錯(cuò)異常,找不到原因
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
?? ?at com.google.zxing.common.CharacterSetECI.getCharacterSetECIByName(CharacterSetECI.java:114)
?? ?at com.google.zxing.qrcode.encoder.Encoder.encode(Encoder.java:95)
?? ?at com.google.zxing.qrcode.QRCodeWriter.encode(QRCodeWriter.java:80)
?? ?at com.google.zxing.MultiFormatWriter.encode(MultiFormatWriter.java:94)
?? ?at com.imooc.zxing.CreateQRCode.main(CreateQRCode.java:30)
總是報(bào)這個(gè)錯(cuò)
2017-12-06
源碼里面有問題 找到錯(cuò)誤 改一些 重新打個(gè)jar包
2016-09-21
??? String contents = null;
?? ??? ?try {
?? ??? ?? BitMatrix??? bitmatrix =new MultiFormatWriter().encode(contents, BarcodeFormat.QR_CODE , width, height,hints);
?? ??? ?? BitMatrix bitmarix;
?? ??? ? ?
?? ??? ? ?
?? ??? ? ?
?? ??? ?? Path file = new File("D:/img.png").toPath();
?? ??? ? //. topath 報(bào)錯(cuò)怎么回事啊
?? ? ?? ? ?
?? ??? ?MatrixToImageWriter.writeToPath(bitmatrix, format, file);
?? ??? ? ?
?? ??? ? ?
?? ??? ?} catch (Exception e) {
?? ??? ??? ?
?? ??? ??? ?e.printStackTrace();
?? ??? ?}
2016-09-21
??? String contents = null;
?? ??? ?try {
?? ??? ?? BitMatrix??? bitmatrix =new MultiFormatWriter().encode(contents, BarcodeFormat.QR_CODE , width, height,hints);
?? ??? ?? BitMatrix bitmarix;
?? ??? ? ?
?? ??? ? ?
?? ??? ??
?? ??? ? // Path file = new File("D:/img.png").toPath();
? 報(bào)錯(cuò)在, 回事啊,請(qǐng)指教
?? ? ?? ? ?
?? ??? ?MatrixToImageWriter.writeToPath(bitmatrix, format, file);
?? ??? ? ?
?? ??? ? ?
?? ??? ?} catch (Exception e) {
?? ??? ??? ?
?? ??? ??? ?e.printStackTrace();
?? ??? ?}
2016-09-04
仔細(xì)檢查下代碼!
2016-09-04
然后你用命令試下代碼;在cmd下
2016-09-04
錯(cuò)誤是編譯錯(cuò)誤,JDK版本說下