[這是我的代碼][1]
[1]: https://i.stack.imgur.com/uoq`val recyclerView = findViewById(R.id.recyclerView) recyclerView.layoutManager=LinearLayoutManager(this) `xi.png
uj5u.com熱心網友回復:
您必須為該findViewById方法推斷正確的型別,否則該recyclerview變數將是一個泛型View而不是一個RecyclerView
val recyclerView = findViewById<RecyclerView>(R.id.recyclerView)
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/364480.html
