如何修复Android HTML打印中的'PrinterDiscoverySession'null错误?

时间:2019-03-28 04:33:48

标签: java android nullpointerexception

java.lang.NullPointerException: session cannot be null
    at android.printservice.PrintService$ServiceHandler.handleMessage(PrintService.java:460)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6119)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

当我开始打印html并且我的应用程序刚刚停止时,我得到了这个错误

0 个答案:

没有答案