简体   繁体   中英

No layout manager attached; Skipping layout

Code: rv = (RecyclerView) findViewById (R.id.recyclerview);

    LinearLayoutManager linearLayoutManager = new LinearLayoutManager (this, LinearLayoutManager.VERTICAL ,false);
    CustomRVAdapter customRVAdapter = new CustomRVAdapter (getApplicationContext (),R.layout.custom_rv_row,new StudentList ().getDefaultStudentList ());
    rv.setAdapter (customRVAdapter);

ERROR Accessing hidden method Landroid/os/Trace;->traceCounter(JLjava/lang/String;I)V (light greylist, reflection)

E/RecyclerView: No layout manager attached; skipping layout

I/le.assignment_: ProcessProfilingInfo new_methods=1577 is saved saved_to_disk=1 resolve_classes_delay=8000

You need to attach the layout manager to the recycler view like so:

LinearLayoutManager linearLayoutManager = new LinearLayoutManager (this, LinearLayoutManager.VERTICAL ,false);
rv.setLayoutManager(linearLayoutManager);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM