Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/217.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android TypeError:表达式的结果';本地存储';[null]不是对象_Android_Jquery Mobile - Fatal编程技术网

Android TypeError:表达式的结果';本地存储';[null]不是对象

Android TypeError:表达式的结果';本地存储';[null]不是对象,android,jquery-mobile,Android,Jquery Mobile,我在Android应用程序中使用jquery向导。到目前为止,我可以看到向导的效果,我的所有子页面都是通过标签来区分的。 但当我的应用程序被Android模拟器加载时,这是一个错误 04-06 15:06:59.939:E/Web控制台(275):TypeError:表达式“localStorage”[null]的结果不是对象。 在file:///android_asset/jquery/jquery.mobile.wizard.js:123 <link rel="stylesheet"

我在Android应用程序中使用jquery向导。到目前为止,我可以看到向导的效果,我的所有子页面都是通过标签来区分的。 但当我的应用程序被Android模拟器加载时,这是一个错误

04-06 15:06:59.939:E/Web控制台(275):TypeError:表达式“localStorage”[null]的结果不是对象。 在file:///android_asset/jquery/jquery.mobile.wizard.js:123

<link rel="stylesheet" href="../jquery/jquery.mobile-1.0.1.min.css" />
<link rel="stylesheet" href="../jquery/jquery.mobile.wizard.css" />
<script src="../jquery/jquery-1.7.1.js"></script>
<script src="../jquery/jquery.mobile-1.0.1.min.js"></script>
<script src="../jquery/jquery.mobile.wizard.js"></script>

这是我的页眉:

<script>
$(function() {
    //$( ".inputdates" ).datepicker();
  $('#autoquoteform').wizard({imagebase:'../image'});
  $('#autoquoteform').bind('keypress', function (event) {
    if (event.which == 13) {
      //$.mobile.changePage($("#homepage"));
    }
  });
});
</script>

$(函数(){
//$(“.inputdates”).datepicker();
$('autoquoteform')。向导({imagebase:'../image'});
$('autoquoteform').bind('keypress',函数(事件){
if(event.which==13){
//$.mobile.changePage($(“#主页”);
}
});
});
单击向导图标时,将发生此错误


那么以前有人遇到过同样的问题吗?

我是这样做的:

    webView.getSettings().setDomStorageEnabled(true);
    webView.getSettings().setDatabaseEnabled(true);
    try {  
        File filesDir = this.getExternalFilesDir(null);   
        File file = new File(filesDir, "SomeFolder"); 
        if (!file.exists()) {
            file.mkdirs();  
        }
        webView.getSettings().setDatabasePath(file.getAbsolutePath());
    } catch (Exception e) {
         throw new RuntimeException("Failed to mkdir dirs, " + e.getMessage(), e);                                    
    }

我是通过这样做来实现的:

    webView.getSettings().setDomStorageEnabled(true);
    webView.getSettings().setDatabaseEnabled(true);
    try {  
        File filesDir = this.getExternalFilesDir(null);   
        File file = new File(filesDir, "SomeFolder"); 
        if (!file.exists()) {
            file.mkdirs();  
        }
        webView.getSettings().setDatabasePath(file.getAbsolutePath());
    } catch (Exception e) {
         throw new RuntimeException("Failed to mkdir dirs, " + e.getMessage(), e);                                    
    }