title: Android webview +javascript not showing output in android 4.0.x,3.x
body: <p>This is my main activity</p>
  
  <pre><code>package com.example.mathjax_issues;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.graphics.Bitmap;
  import android.util.Log;
  import android.view.Menu;
  import android.webkit.WebResourceResponse;
  import android.webkit.WebView;
  import android.webkit.WebViewClient;
  
  public class MainActivity extends Activity {
  
  
      private WebView webView;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          webView=(WebView)findViewById(R.id.webView1);
          webView.getSettings().setJavaScriptEnabled(true);
          webView.setWebViewClient(new MyWebViewClient());
          webView.loadUrl("file:///android_asset/MathJax/test/sample-asciimath.html");
  //      String html="&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;MathJax AsciiMath Test Page&lt;/title&gt; &lt;!-- Copyright (c) 2012-2013 The MathJax Consortium --&gt; &lt;meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" /&gt; &lt;meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" /&gt; &lt;script type=\"text/javascript\" src=\"file:///android_asset/MathJax/MathJax.js?config=AM_HTMLorMML-full\"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;p&gt; When `a != 0`, there are two solutions to `ax^2 + bx + c = 0` and they are &lt;/p&gt; &lt;p style=\"text-align:center\"&gt; `x = (-b +- sqrt(b^2-4ac))/(2a) .` &lt;/p&gt; &lt;/body&gt; &lt;/html&gt; ";
  //      Log.e("html",html);
  //      webView.loadDataWithBaseURL("file:///android_asset/MathJax", html, "text/html","utf-8", "");
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
  
      private class MyWebViewClient extends WebViewClient
      {
  
          @Override
          public void onPageFinished(WebView view, String url) {
              // TODO Auto-generated method stub
              super.onPageFinished(view, url);
          }
  
          @Override
          public void onPageStarted(WebView view, String url, Bitmap favicon) {
              // TODO Auto-generated method stub
              super.onPageStarted(view, url, favicon);
          }
  
  
  
  
      }
  
  
  
  }
  </code></pre>
  
  <p>This my sample-asciimath.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;MathJax AsciiMath Test Page&lt;/title&gt;
  &lt;!-- Copyright (c) 2012-2013 The MathJax Consortium --&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
  &lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&gt;
  
  &lt;script type="text/javascript" src="../MathJax.js?config=AM_HTMLorMML-full"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;p&gt;
  When `a != 0`, there are two solutions to `ax^2 + bx + c = 0` and they are
  &lt;/p&gt;
  &lt;p style="text-align:center"&gt;
  `x = (-b +- sqrt(b^2-4ac))/(2a) .`
  &lt;/p&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>below is the image of my project  </p>
  
  <p><img src="https://i.stack.imgur.com/nGnOK.png" alt="enter image description here"></p>
  
  <p>when compiling this code in 2.3.3,2.2,4.1.2,4.2.2 latest versions </p>
  
  <p>I get the correct output from the source </p>
  
  <p><img src="https://i.stack.imgur.com/LvVu8.png" alt="enter image description here"></p>
  
  <p>but when i compiled the same source in 3.0,3.1 and 4.0.3,4.0.4 android version</p>
  
  <p>I am getting the wrong output like this </p>
  
  <p><img src="https://i.stack.imgur.com/G506e.png" alt="enter image description here"></p>
  
  <p>Friends pls help me ... I am unable to solve this error ... I think there may be a javascript problem.Hope you guys give me some idea </p>
  
  <p>I am storing the mathjax locally .. in assets  </p>
  
  <p>Thanks in advance ...</p>