title: Android with Kotlin error when use RecyclerView in Fragment
body: <p>I have error said this:</p>
  
  <blockquote>
    <p>Process: com.example.yudha.kotlinauth, PID: 16435
        java.lang.IllegalStateException: video_recyclerview must not be null
            at com.example.yudha.kotlinauth.fragments.VideoFragment.onCreateView(VideoFragment.kt:30)</p>
  </blockquote>
  
  <p><strong>RecyclerView Adapter:</strong></p>
  
  <pre><code>    class MainAdapter : RecyclerView.Adapter&lt;CustomViewHolder&gt;(){
      val videoTitles = listOf("First title", "Second", "3rd", "Moore Title")
  
      //number of item
      override fun getItemCount(): Int {
          return videoTitles.size
      }
  
      override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): CustomViewHolder {
          //create view
          val layoutInflater = LayoutInflater.from(parent.context)
          val cellForRow = layoutInflater.inflate(R.layout.video_row, parent, false)
          return CustomViewHolder(cellForRow)
      }
  
      override fun onBindViewHolder(holder: CustomViewHolder, position: Int) {
          val videoTitle = videoTitles.get(position)
          holder?.view?.video_title.text= videoTitle
      }
  }
  
  class CustomViewHolder(val view: View): RecyclerView.ViewHolder(view){
  
  }
  </code></pre>
  
  <p><strong>Fragment Activity:</strong></p>
  
  <pre><code>class VideoFragment : Fragment() {
  
      override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
                                savedInstanceState: Bundle?): View? {
          val rootView = inflater.inflate(R.layout.fragment_video, container, false)
  
  
          video_recyclerview.layoutManager = LinearLayoutManager(activity)
          video_recyclerview.adapter = MainAdapter()
          return rootView
      }
  }
  </code></pre>
  
  <p><strong>myFragment XML:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      tools:context=".fragments.VideoFragment"&gt;
  
  
      &lt;android.support.v7.widget.RecyclerView
          android:id="@+id/video_recyclerview"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>Recycler view(videorow.xml):</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
      &lt;ImageView
          android:id="@+id/imageView2"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginEnd="8dp"
          android:layout_marginStart="8dp"
          android:layout_marginTop="8dp"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent"
          app:srcCompat="@mipmap/ic_launcher" /&gt;
  
      &lt;TextView
          android:id="@+id/video_title"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_marginEnd="8dp"
          android:layout_marginStart="8dp"
          android:text="TextView"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintHorizontal_bias="1.0"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toBottomOf="@+id/imageView2" /&gt;
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>