title: recyclerview must not be null
body: <pre><code>Process: com.bignerdranch.android.on_callbabysitting, PID: 19624
      java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bignerdranch.android.on_callbabysitting/com.bignerdranch.android.on_callbabysitting.Home}: java.lang.IllegalStateException: recyclerv_view must not be null
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
          at android.app.ActivityThread.-wrap11(Unknown Source:0)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
          at android.os.Handler.dispatchMessage(Handler.java:105)
          at android.os.Looper.loop(Looper.java:164)
          at android.app.ActivityThread.main(ActivityThread.java:6541)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
       Caused by: java.lang.IllegalStateException: recyclerv_view must not be null
          at com.bignerdranch.android.on_callbabysitting.Home.onCreate(Home.kt:42)
          at android.app.Activity.performCreate(Activity.java:6975)
          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892) 
          at android.app.ActivityThread.-wrap11(Unknown Source:0) 
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593) 
          at android.os.Handler.dispatchMessage(Handler.java:105) 
          at android.os.Looper.loop(Looper.java:164) 
          at android.app.ActivityThread.main(ActivityThread.java:6541) 
          at java.lang.reflect.Method.invoke(Native Method) 
          at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 
  
  &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:orientation=&quot;vertical&quot;
      tools:context=&quot;.Home&quot;&gt;
  
      &lt;androidx.recyclerview.widget.RecyclerView
          android:id=&quot;@+id/recyclerv_view&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height =&quot;match_parent&quot;&gt;
  
      &lt;/androidx.recyclerview.widget.RecyclerView&gt;
  
  &lt;/RelativeLayout&gt;
  
  package com.bignerdranch.android.on_callbabysitting
  
  import android.content.Context
  import android.os.Bundle
  import android.view.LayoutInflater
  import android.view.View
  import android.view.View.inflate
  import android.widget.EditText
  import android.widget.TextView
  import androidx.appcompat.app.AppCompatActivity
  import androidx.recyclerview.widget.LinearLayoutManager
  import androidx.recyclerview.widget.RecyclerView
  import kotlinx.android.synthetic.main.activity_main.*
  import kotlinx.android.synthetic.main.recycv1.*
  import kotlinx.android.synthetic.main.sidebar.*
  import java.lang.IllegalStateException
  
  class Home : AppCompatActivity() {
  
  
      var names = ArrayList&lt;String&gt;()
      var imgUrls = ArrayList&lt;String&gt;()
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.homepage)
          lateinit var context: Context
  
          var helper = MyDBHelper(applicationContext)
          var db = helper.readableDatabase
          var rs = db.rawQuery(&quot;SELECT * FROM USERS&quot;, null)
  
          rs.moveToFirst()
          while(rs.isAfterLast == false)
          {
              names.add(rs.getString(rs.getColumnIndex(&quot;EMAIL&quot;)))
              rs.moveToNext()
              names.add(rs.getString(rs.getColumnIndex(&quot;FIRST_NAME&quot;)))
              rs.moveToNext()
              //names.add(rs.getString(rs.getColumnIndex(&quot;LAST_NAME&quot;)))
              //rs.moveToNext()
          }
          recyclerv_view.layoutManager = LinearLayoutManager(this)
          recyclerv_view.adapter = RecyclerViewAdapter(imgUrls, names, this)
          /*names.add(editTextTextEmailAddress3.getText().toString())
          names.add(editTextTextPassword.getText().toString())
          //names.add(editTextTextEmailAddress3.getText().toString())
          //names.add(editTextTextPassword.getText().toString())*/
  
          //try {
             // recyclerv_view.adapter = RecyclerViewAdapter.First(this, imgUrls, names)
              //recyclerv_view.layoutManager = LinearLayoutManager(this)
         // }catch (ignored: IllegalStateException)
          //{
  
          //}
          //val recyclerView : RecyclerView = findViewById(R.id.recyclerv_view)
          //val recyclerView = findViewById&lt;RecyclerView&gt;(R.id.recyclerv_view)
          //recyclerView.setAdapter(first)
          //recyclerView.setLayoutManager(LinearLayoutManager(this))
      }
  
  
  }
  
  
  
  package com.bignerdranch.android.on_callbabysitting
  
  import android.app.PendingIntent.getActivity
  import android.content.Context
  import android.view.LayoutInflater
  import android.view.View
  import android.view.ViewGroup
  import android.widget.EditText
  import androidx.recyclerview.widget.RecyclerView
  import de.hdodenhof.circleimageview.CircleImageView
  import android.widget.TextView
  import android.widget.LinearLayout
  import com.bumptech.glide.Glide
  import java.security.AccessController.getContext
  
  open class RecyclerViewAdapter(val imgNames: ArrayList&lt;String&gt;, val imgPic: ArrayList&lt;String&gt;, val context: Context) : RecyclerView.Adapter&lt;RecyclerViewAdapter.ViewHolder&gt;() {
  
      //var Context = context
  
      class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
      {
  
         // lateinit var cimg:CircleImageView
          //lateinit var img:TextView
  
          //lateinit var parentLayout: LinearLayout
  
          val CircleImageView = itemView.findViewById&lt;CircleImageView&gt;(R.id.profile_image)
          val TextView = itemView.findViewById&lt;TextView&gt;(R.id.textView19)
          val TextView1 = itemView.findViewById&lt;TextView&gt;(R.id.textView18)
          val TextView2 = itemView.findViewById&lt;TextView&gt;(R.id.textView20)
          val parentLayout = itemView.findViewById&lt;LinearLayout&gt;(R.id.parent_layout)
  
      }
  
      override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
          //var View = LayoutInflater.from(parent.getContext()).inflate(R.layout.homepage, parent, false)
          //var viewHolder = ViewHolder(View)
          return ViewHolder(LayoutInflater.from(context).inflate(R.layout.homepage, parent, false))
      }
  
      override fun getItemCount(): Int {
  
          return imgNames.size
      }
  
      override fun onBindViewHolder(holder: ViewHolder, position: Int) {
  
  
         /* Glide
              .with(context)
              .asBitmap()
              .load(imgPic.get(position))
              .into(holder.CircleImageView)
  
          var First = First(context,imgNames, imgPic)
          First.imgN.add(imgNames.get(position))
  
          */
          holder?.TextView?.text = imgNames.get(position)
          holder?.TextView1.text = imgNames.get(position)
          holder?.TextView2.text = imgNames.get(position)
          holder?.parentLayout.parent
      }
  }
  </code></pre>
  <p>I am trying to have my code display the user's name at login in the home page, I can successfully move in from one activity to the next with a click, but when I add the recycler view in my home activity, it doesn't work. Attached is the recycler view XML, adapter activity, and my home class activity along with the log.</p>