Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mRecycler' is not public in 'androidx.recyclerview.widget.RecyclerView'. Cannot be accessed from outside package #1

Open
The-RobinHood opened this issue Jul 23, 2019 · 1 comment

Comments

@The-RobinHood
Copy link

Hi,
Recently I converted entire project into Androidx which start giving me below error in RecyclerViewHelper class.

mRecycler' is not public in 'androidx.recyclerview.widget.RecyclerView'. Cannot be accessed from outside package

package androidx.support.v7.widget;

import androidx.recyclerview.widget.RecyclerView;

  public class RecyclerViewHelper {
  public static int convertPreLayoutPositionToPostLayout(RecyclerView recyclerView, int position) {
    return recyclerView.mRecycler.convertPreLayoutPositionToPostLayout(position);
   }
}

Any other way to access mRecycler and override this error?

Thanks.

@maozgal
Copy link

maozgal commented May 13, 2020

Hi @The-RobinHood , I just solve for another project and came across your question.

Since the package of RecyclerView has changed, What I did was to change the package:
package androidx.support.v7.widget;

to:
package androidx.recyclerview.widget;

Hope it can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants