问题
I m trying to run my html and js code in android studio.but i failed.Can anyon1 tell me what shold i do :
I took an example of html and js from highchart site.I save my html and js file as demo.html in raw folder in res.
My java code is :
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_activitytml);
WebView wv=(WebView) findViewById(R.id.webview);
wv.setWebChromeClient(new WebChromeClient());
wv.setWebViewClient(new WebViewClient());
wv.getSettings().setDomStorageEnabled(true);
wv.getSettings().setJavaScriptEnabled(true);
wv.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
wv.loadUrl("file:///android_res/raw/demo.html");
}
when i run this code...only a blank screen occured..with no outpu and i m using webview in xml file. Plzz can anyone help me. I got the blank screen in emulator.I m able to call the html page but when i make piechart using html and js. then it returns nothing. screen is blank. can anyonehelp me out plzz. Thanks in advance..
来源:https://stackoverflow.com/questions/39324431/using-highcharts-in-android