Android &引用;未捕获类型错误:无法读取属性';o';“空”的定义谷歌打印安卓
我正在从我的Android应用程序中实现Google打印。我已经实现了,但是当我打印时,我得到了这个错误-Android &引用;未捕获类型错误:无法读取属性';o';“空”的定义谷歌打印安卓,android,Android,我正在从我的Android应用程序中实现Google打印。我已经实现了,但是当我打印时,我得到了这个错误- [INFO:CONSOLE(287)] "Uncaught TypeError: Cannot read property 'o' of null", source: https://www.google.com/cloudprint/client/1572946473-dialog_mobile.js (287) 我已经搜索过这个错误了。我得到了 settings.setDomStor
[INFO:CONSOLE(287)] "Uncaught TypeError: Cannot read property 'o' of null", source: https://www.google.com/cloudprint/client/1572946473-dialog_mobile.js (287)
我已经搜索过这个错误了。我得到了settings.setDomStorageEnabled(true)代码>
但我还是犯了同样的错误。
请帮帮我
提前谢谢
调用PrintDialog的代码
if (!isNetworkAvailable()) {
Toast.makeText(FinalCanvasScreen.this,
"Network connection not available, Please try later",
Toast.LENGTH_SHORT).show();
} else {
File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/xyz.pdf");
Intent printIntent = new Intent(FinalCanvasScreen.this, PrintDialogActivity.class);
printIntent.setDataAndType(Uri.fromFile(file), "application/pdf");
printIntent.putExtra("meCard", "meCard print ");
startActivity(printIntent);
}
通过添加以下内容修复了此问题:
@android.webkit.JavascriptInterface
在Javascript接口类的所有方法上。我应该把它放在哪里?你知道是否可以使用URL打印吗?