Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/203.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 WebView加载URL错误文件_Android_Android Studio_Android Webview - Fatal编程技术网

未找到Android WebView加载URL错误文件

未找到Android WebView加载URL错误文件,android,android-studio,android-webview,Android,Android Studio,Android Webview,我在android studio中启动了一个空白活动,在“原始”文件夹中添加了一个Html文件。我创建了一个webview并调用了函数myWebView.loadUrl(“file:///res/raw/test.html"). 在emulator中运行应用程序时,会显示“未找到文件”。有人能帮忙吗? 使用这个片段 WebView myWebView = (WebView)findViewById(R.id.my_webview); lWebView.loadUr

我在android studio中启动了一个空白活动,在“原始”文件夹中添加了一个Html文件。我创建了一个webview并调用了函数myWebView.loadUrl(“file:///res/raw/test.html"). 在emulator中运行应用程序时,会显示“未找到文件”。有人能帮忙吗? 使用这个片段

WebView myWebView = (WebView)findViewById(R.id.my_webview);
                lWebView.loadUrl("file:///android_res/raw/htmlfile.html");
使用它可以得到解决方案