title: Android Parcelable for Kotlin is not working
body: <p>I am trying to pass data from one fragment to another but I am facing issue with sending data from parcelable from one fragment to another.</p>
  
  <pre><code> class MainFragment : Fragment() {
  
  
      companion object {
          public val KEY_PARSE_DATA = "parseData"
      }
  
      private var parseData: ParseData? = null
  
      override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?,
                                savedInstanceState: Bundle?): View? {
          // Inflate the layout for this fragment
          return inflater!!.inflate(R.layout.fragment_main, container, false).apply {
              val editName = findViewById(R.id.edit_Name) as EditText
              val editSurname = findViewById(R.id.edit_Surname) as EditText
              val buttonNext = findViewById(R.id.btn_Next) as Button
              buttonNext.setOnClickListener(View.OnClickListener {
                  val fragment = AnotherFragment()
  
                  if (parseData != null) {
                      var parseData = ParseData(editName.text.toString(), editSurname.text.toString())
                      val fragment = AnotherFragment()
                      val bundle = Bundle()
                      bundle.putParcelable(KEY_PARSE_DATA, parseData)
                      fragment.setArguments(bundle)
                      fragmentManager.beginTransaction().add(R.id.fragment_container, fragment).commitAllowingStateLoss()
  
                  }
  
              })
          }
      }
  
  
  }// Required empty public constructor
  </code></pre>
  
  <p>Parcelable class for implementing it</p>
  
  <pre><code> @SuppressLint("ParcelCreator")
  @Parcelize
  data class ParseData(val firstName: String, val lastName: String) : Parcelable {
  
  
      constructor(parcel: Parcel) : this(
              parcel.readString(),
              parcel.readString()) {
      }
  
      override fun toString(): String {
          return "ParseData(firstName='$firstName', lastName='$lastName')"
      }
  
  
      companion object : Parceler&lt;ParseData&gt; {
  
          override fun ParseData.write(parcel: Parcel, flags: Int) {
              parcel.writeString(firstName)
              parcel.writeString(lastName)
          }
  
          override fun create(parcel: Parcel): ParseData {
              return ParseData(parcel)
          }
      }
  }
  </code></pre>
  
  <p>And another fragment which grab data from parcelable class in android</p>
  
  <pre><code>    class AnotherFragment : Fragment() {
  
      override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?,
                                savedInstanceState: Bundle?): View? {
          // Inflate the layout for this fragment
          return inflater!!.inflate(R.layout.fragment_another, container, false).apply {
  
              val textName = findViewById&lt;TextView&gt;(R.id.textFirst)
              val textSurname = findViewById&lt;TextView&gt;(R.id.textSecond)
              val bundle = arguments
              if (bundle != null) {
                  val parseData = bundle.getParcelable&lt;ParseData&gt;(KEY_PARSE_DATA)
                  textName.setText(parseData.firstName)
                  textSurname.setText(parseData.lastName)
              }
          }
      }
  
  }
  </code></pre>
  
  <p>I tried some example but I cant get clear idea how parcelable is implemented in andoid application based on kotlin and build.gradle file</p>
  
  <pre><code> apply plugin: 'com.android.application'
  
  apply plugin: 'kotlin-android'
  
  apply plugin: 'kotlin-android-extensions'
  
  android {
      compileSdkVersion 26
      defaultConfig {
          applicationId "com.assignment.ankitt.kotlinsecond"
          minSdkVersion 19
          targetSdkVersion 26
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  androidExtensions {
      experimental = true
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
      implementation 'com.android.support:appcompat-v7:26.1.0'
      implementation 'com.android.support.constraint:constraint-layout:1.0.2'
      implementation 'com.android.support:support-v4:26.1.0'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.1'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  }
  </code></pre>