0
我已將我的靜態web應用程序放置在資源文件夾中。我的靜態Web應用程序有很多文件夾並放置在資源文件夾中。我從另一個HTML與子文件夾中調用HTML。我正在'找不到文件'。有人可以告訴我問題是什麼嗎?我下面張貼我的代碼:在android的webview中找不到文件
wv=(WebView)findViewById(R.id.webView);
//wv.loadDataWithBaseURL("file:///android_asset/Opana_Changes/html/_assets/asset_001/index.html","","html");
try {
InputStream is=getAssets().open("Opana_Changes/index.html");
BufferedReader br=new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine()) != null) {
html=html+line;
}
br.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
wv.loadDataWithBaseURL("file:///android_asset/Opana_Changes/",html,"text/html", "UTF-8",null);
wv.getSettings().setJavaScriptEnabled(true);
}