title: On clicking the hyperlink in webview the app crashes. I have paced all the html files in the assets folder
body: <p>I am trying to make an app that opens a local html page which has hyperlinks linked to 2 other pages. All these html files are placed in assets folder. Now when I touch the hyperlink one the first html file, the app crashes intsead of opening the other html file.</p>
  
  <pre><code>package com.example.rishabh.webviewdemo;
  
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.webkit.WebView;
  
  public class MainActivity extends AppCompatActivity {
      WebView web;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          web= (WebView) findViewById(R.id.webview);
          web.loadUrl("file:///android_asset/1.html");
      }
  }
  </code></pre>
  
  <p>Here's the log</p>
  
  <pre><code>W/System.err: android.os.FileUriExposedException:file:///android_asset/2.html exposed beyond app through Intent.getData()
  W/System.err:     at android.os.StrictMode.onFileUriExposed(StrictMode.java:1799)
  W/System.err:     at android.net.Uri.checkFileUriExposed(Uri.java:2346)
  W/System.err:     at android.content.Intent.prepareToLeaveProcess(Intent.java:8965)
  W/System.err:     at android.content.Intent.prepareToLeaveProcess(Intent.java:8926)
  W/System.err:     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1517)
  W/System.err:     at android.app.Activity.startActivityForResult(Activity.java:4225)
  W/System.err:     at android.support.v4.app.BaseFragmentActivityJB.startActivityForResult(BaseFragmentActivityJB.java:48)
  W/System.err:     at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:77)
  W/System.err:     at android.app.Activity.startActivityForResult(Activity.java:4183)
  W/System.err:     at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:859)
  W/System.err:     at android.app.Activity.startActivity(Activity.java:4522)
  W/System.err:     at android.app.Activity.startActivity(Activity.java:4490)
  W/System.err:     at android.content.ContextWrapper.startActivity(ContextWrapper.java:356)
  W/System.err:     at org.chromium.android_webview.ResourcesContextWrapperFactory$WebViewContextWrapper.startActivity(ResourcesContextWrapperFactory.java:121)
  W/System.err:     at org.chromium.android_webview.AwContentsClient.sendBrowsingIntent(AwContentsClient.java:203)
  W/System.err:     at org.chromium.android_webview.AwContentsClient.shouldIgnoreNavigation(AwContentsClient.java:170)
  W/System.err:     at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(AwContentsClientBridge.java:256)
  W/System.err:     at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
  W/System.err:     at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:39)
  W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:102)
  W/System.err:     at android.os.Looper.loop(Looper.java:154)
  W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:6119)
  W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
  W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
  W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
   A/chromium: [FATAL:jni_android.cc(236)] Please include Java exception stack in crash report
  W/google-breakpad: ### ### ### ### ### ### ### ### ### ### ### ### ###
  W/google-breakpad: Chrome build fingerprint:
  W/google-breakpad: 1.0
  W/google-breakpad: 1
  W/google-breakpad: ### ### ### ### ### ### ### ### ### ### ### ### ###
      A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 4203 (abh.webviewdemo)
  
      [ 11-13 22:33:57.340  1186: 1186 W/         ]
      debuggerd: handling request: pid=4203 uid=10073 gid=10073 tid=4203
  Application terminated.
  </code></pre>