From the documentation I am trying to do something like this
//Primary:
class Main2Activity(val name: String) {
}
//Secondary:
constructor(a: Int) : super() {
this.a = a
}
So the android studio gives me the option to create this secondary constructor . But it doesn't recognize the primary constructor which I wrote above. I also tried it in few other ways like init and all. It gives me error that secondary constructor not allowed without defining primary one . So how to write primary constructor.