Looking for ?

Translate

java.lang.NullPointerException at android.support.v7.widget.RecyclerView.setLayoutManager

All You are seeing in Operaminitech are only problems i the admin has solved. so feel relaxed and help your self.


 So if you are having this problem"java.lang.NullPointerException at android.support.v7.widget.RecyclerView.setLayoutManager" in android studio or any other IDE you are using. one of the below will solve the issue.

FIRST:
 Go to your MainActivity.java class and replace this

setContentView(R.layout.activity_main); to setContentView(R.layout.layoutfile_with android.support.v7.widget.RecyclerView);


OR 
SECOND:


final LinearLayoutManager layoutManager = new LinearLayoutManager(context);
layoutManager
.setOrientation(LinearLayoutManager.VERTICAL);
recyclerView
.setLayoutManager(layoutManager);


I hope your problem is soved?

SHARE THIS POST

About Wakabia

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment