Frequently Getting at dalvik.system.NativeStart.main(Native Method) Error

I’m able to successfully build an app, but when I run it it stops after the splash screen is displayed.
Here is my Error code

07-27 16:56:47.638 4600-4600/com.faraksoch.sagar.cdproutine E/AndroidRuntime: FATAL EXCEPTION: main
                                                                          Process: com.faraksoch.sagar.cdproutine, PID: 4600
                                                                          java.lang.NullPointerException
                                                                              at com.faraksoch.sagar.cdproutine.MainActivity$1.onPageFinished(MainActivity.java:37)
                                                                              at com.android.webview.chromium.WebViewContentsClientAdapter.onPageFinished(WebViewContentsClientAdapter.java:449)
                                                                              at com.android.org.chromium.android_webview.AwContentsClient$AwWebContentsObserver$1.run(AwContentsClient.java:73)
                                                                              at android.os.Handler.handleCallback(Handler.java:733)
                                                                              at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                              at android.os.Looper.loop(Looper.java:136)
                                                                              at android.app.ActivityThread.main(ActivityThread.java:5021)
                                                                              at java.lang.reflect.Method.invokeNative(Native Method)
                                                                              at java.lang.reflect.Method.invoke(Method.java:515)
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:827)
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:643)
                                                                              at dalvik.system.NativeStart.main(Native Method)

and Here is the Mainactivity.java code

package com.faraksoch.sagar.cdproutine;

import android.app.DownloadManager;
import android.content.Intent;
import android.net.Uri;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.webkit.DownloadListener;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageView;
import android.widget.Toast;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        WebView webView = (WebView) findViewById(R.id.webView);
        webView.getSettings().setJavaScriptEnabled(true);
        webView.getSettings().setAppCacheEnabled(true);
        webView.getSettings().setSupportZoom(true);


        webView.setWebViewClient(new WebViewClient() {


            public void onPageFinished(WebView view, String url) {
                findViewById(R.id.image1).setVisibility((View.GONE));
                findViewById(R.id.tee).setVisibility((View.GONE));
                findViewById(R.id.webView).setVisibility(View.VISIBLE);
                findViewById(R.id.button2).setVisibility(View.VISIBLE);

            }
        });
        webView.loadUrl("file:///android_asset/index.html");



        webView.setDownloadListener(new DownloadListener() {

            @Override
            public void onDownloadStart(String url, String userAgent,
                                        String contentDisposition, String mimetype,
                                        long contentLength) {
                DownloadManager.Request request = new DownloadManager.Request(
                        Uri.parse(url));

                request.allowScanningByMediaScanner();
                request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); //Notify client once download is completed!
                request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, "Name of your downloadble file goes here, example: Mathematics II ");
                DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
                dm.enqueue(request);
                Toast.makeText(getApplicationContext(), "Downloading File", //To notify the Client that the file is being downloaded
                        Toast.LENGTH_LONG).show();

            }
        });
    }


}

and Here iis the Main4activity.java file code

package com.faraksoch.sagar.cdproutine;


import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.winsontan520.wversionmanager.library.WVersionManager;

public class Main4Activity extends AppCompatActivity  {

    Button updateButton;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main4);

        updateButton = (Button) findViewById(R.id.button2);
        updateButton.setOnClickListener(new MyClass());

    }

    public class MyClass implements View.OnClickListener {

        @Override
        public void onClick(View v) {
            WVersionManager versionManager = new WVersionManager(Main4Activity.this);
            versionManager.setVersionContentUrl("http://link_to_version_test_file/version.txt");
            versionManager.setUpdateUrl("http://link_to_updated_apk_file/latest.apk");
            versionManager.checkVersion();
        }

    }
}

and finally Main2activity.java file code

package com.faraksoch.sagar.cdproutine;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.winsontan520.wversionmanager.library.WVersionManager;

public class Main2Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);

            WVersionManager versionManager = new WVersionManager(Main2Activity.this);
            versionManager.setVersionContentUrl("http://some link"); // your update content url, see the response format below
            versionManager.checkVersion();

         versionManager.setUpdateNowLabel("Custom update now label");
        versionManager.setRemindMeLaterLabel("Custom remind me later label");
        versionManager.setIgnoreThisVersionLabel("Custom ignore this version");
        versionManager.setUpdateUrl("http://your_app_url"); // this is the link will execute when update now clicked. default will go to google play based on your package name.
        versionManager.setReminderTimer(10); // this mean checkVersion() will not take effect within 10 minutes

         }

}

the app build gradle code is

apply plugin: 'com.android.application'


android {
    compileSdkVersion 26
    buildToolsVersion "26.0.0"
    defaultConfig {
        applicationId "com.faraksoch.sagar.cdproutine"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    }

    dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'org.jsoup:jsoup:1.10.3'

    compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.2'
    compile 'com.android.support:appcompat-v7:26.0.0'

    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'org.jsoup:jsoup:1.10.3'
    testCompile 'junit:junit:4.12'
}

and Build gradle file is

// Top-level build file where you can add 
configuration options common to all sub-projects/modules.
allprojects {
        repositories {
            jcenter()
            maven {
                url "https://maven.google.com"
            }
        }
    }

    buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}