JavaBinder:未捕获的远程异常! (尚不支持跨流程例外吗?

时间:2019-01-28 06:14:48

标签: android json aidl thermal-printer

当我尝试使用辅助类打印纸时  异常在我的片段类

中引发
       com.iposprinter.iposprinterservice E/JavaBinder: *** Uncaught remote exception!  (Exceptions are not yet supported across processes.)
java.lang.ArrayIndexOutOfBoundsException: length=4032; index=4032

我在片段类中的其他代码如下

第一个是启动打印机

       public void initPrinter() {
ThreadPoolManager.getInstance().executeTask(new Runnable() {
    @Override
    public void run() {
        try {
            mIPosPrinterService.printerInit(callback);
        } catch (RemoteException e) {
            e.printStackTrace();
        }
    }
});}

这是在打印机状态就绪时打印文本的代码

             public void printText()
{
    ThreadPoolManager.getInstance().executeTask(new Runnable()
    {

        @Override
        public void run()
        {


            try {
                mIPosPrinterService.printSpecifiedTypeText("  GLOWSIS TECHNOLOGIES\n", "ST", 42, callback);
                mIPosPrinterService.printSpecifiedTypeText("         " + "Educare IT Park,Tiroorangadi\n", "ST", 24, callback);
                mIPosPrinterService.printSpecifiedTypeText("04942405643,9633332673\n", "ST", 42, callback);
                mIPosPrinterService.printSpecifiedTypeText("--------------------------------\n", "ST", 24, callback);
                mIPosPrinterService.printerPerformPrint(160,  callback);
            }catch (RemoteException e){
                e.printStackTrace();
            }
        }
    });
}

我的日志猫低于

             01-28 14:09:12.820 3450-3719/com.iposprinter.iposprinterservice E/JavaBinder: *** Uncaught remote exception!  (Exceptions are not yet supported across processes.)
java.lang.ArrayIndexOutOfBoundsException: length=4032; index=4032
    at com.iposprinter.iposprinterservice.corealgorithm.FontMethod.getPrintDataFromFont(FontMethod.java:552)
    at com.iposprinter.iposprinterservice.corealgorithm.PrinterInteractiveMethod.printerPrintSpecTypeText(PrinterInteractiveMethod.java:344)
    at com.iposprinter.iposprinterservice.IPosPrintService$1.printSpecifiedTypeText(IPosPrintService.java:186)
    at com.iposprinter.iposprinterservice.IPosPrinterService$Stub.onTransact(IPosPrinterService.java:152)

0 个答案:

没有答案