title: Android WebView: Using relative paths when loading javascript from assets
body: <p>I was able to create an Android hello world app that loads html file from assets folder using WebView.loadDataWithBaseURL method:</p>
  
  <pre><code>webView.loadDataWithBaseURL("file:///android_asset/appcode/", html, "text/html", "UTF-8", null);
  </code></pre>
  
  <p>My html looks somewhat like this:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="ISO-8859-1"&gt;
      &lt;title&gt;Insert title here&lt;/title&gt;
  
      &lt;script src="/js/lib/jquery-1.11.0.js"&gt;&lt;/script&gt; &lt;!-- This script is not being loaded --&gt;
      &lt;script src="helloWorld.js"&gt;&lt;/script&gt; &lt;!-- This script is being loaded --&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="placeholder"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The problem is the following: jquery-1.11.0.js is not being loaded while helloWorld.js file loads successfully. I verified that the file exists under relative path.</p>
  
  <p>If I move jquery-1.11.0.js to the html file location (to the same place where helloWorld.js is located), it fixes the problem. But I want to use relative paths for loading scripts. Thanks in advance.</p>
  
  <p>UPDATE:</p>
  
  <ol>
  <li>Moving all js files under /assets/appcode/ is not an option,
  because I am planning to reuse html files that are relying on these
  relative paths</li>
  <li>Using CDN links will not work, because I'm
  planning to load my own scripts that are not available on the web</li>
  <li>If i use "file:///android_asset/appcode/js/lib/jquery-1.11.0.js" instead of "/js/lib/jquery-1.11.0.js" it also works. But this is absolute path, when I want to use relative.</li>
  </ol>