I am using a WebView within a CardView with Recyclerview.
I implemented them correctly, but the problem is that when I run application it crashes and shows a nullpointer exception, 
Log crash report:
java.lang.RuntimeException: Unable to start activity ComponentInfo{andro.petrochemical/andro.petrochemical.webViewNews}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.webkit.WebView.setWebViewClient(android.webkit.WebViewClient)' on a null object reference
                                                                              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
                                                                              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
                                                                              at android.app.ActivityThread.-wrap12(ActivityThread.java)
                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
                                                                              at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                              at android.os.Looper.loop(Looper.java:154)
                                                                              at android.app.ActivityThread.main(ActivityThread.java:6077)
                                                                              at java.lang.reflect.Method.invoke(Native Method)
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
                                                                           Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.webkit.WebView.setWebViewClient(android.webkit.WebViewClient)' on a null object reference
                                                                              at andro.petrochemical.webViewNews.onCreate(webViewNews.java:33)
                                                                              at android.app.Activity.performCreate(Activity.java:6662)
                                                                              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
                                                                              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
                                                                              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) 
                                                                              at android.app.ActivityThread.-wrap12(ActivityThread.java) 
                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) 
                                                                              at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                              at android.os.Looper.loop(Looper.java:154) 
                                                                              at android.app.ActivityThread.main(ActivityThread.java:6077) 
                                                                              at java.lang.reflect.Method.invoke(Native Method) 
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) 
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) 
WebView CardView xml:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent" android:layout_height="match_parent">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    <WebView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/webView_news"/>
    </LinearLayout>
</android.support.v7.widget.CardView>
RecyclerView xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <android.support.v7.widget.RecyclerView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layoutManager="android.support.v7.widget.LinearLayoutManager"
        android:id="@+id/resycleWeb"/>
</LinearLayout>
WebView java class file:
public class webViewNews extends AppCompatActivity {
    private WebView webviewthis;
    private RecyclerView webVieRes;
    private DatabaseReference mdataRef;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.webview_page);
        webVieRes = (RecyclerView) findViewById(R.id.resycleWeb);
        mdataRef = FirebaseDatabase.getInstance().getReference().child("weber");
        webviewthis = (WebView)findViewById(R.id.webView_news);
            webviewthis.setWebViewClient(new WebViewClient());
            webviewthis.getSettings().setJavaScriptEnabled(true);
            webviewthis.getSettings().setLoadsImagesAutomatically(true);
        }
    @Override
    public void onStart() {
        super.onStart();
        FirebaseRecyclerAdapter<post2web,post2webViewHolder> firebaseRecyclerAdapte = new FirebaseRecyclerAdapter<post2web,post2webViewHolder>(
                post2web.class,
                R.layout.web_card,
                post2webViewHolder.class,
                mdataRef
        ) {
            @Override
            protected void populateViewHolder(post2webViewHolder viewHolder, post2web model, int position) {
                viewHolder.setWebViewPost(model.getWebViewPost());
            }
        };
        webVieRes.setAdapter(firebaseRecyclerAdapte);
    }
    public static class post2webViewHolder extends RecyclerView.ViewHolder {
        View mVie;
        public post2webViewHolder(View itemView) {
            super(itemView);
            mVie = itemView;
        }
        public void setWebViewPost(String webViewPost) {
            WebView post_web = (WebView) mVie.findViewById(R.id.webView_news);
            post_web.loadUrl(webViewPost);
        }
    }
}
 
     
     
     
    