Tôi có một bố trí với một số quan điểm, một trong số họ có id title_whalemare
Kotlin mở rộng tổng hợp để xem
import kotlinx.android.synthetic.main.controller_settings.*
import kotlinx.android.synthetic.main.view_double_text.*
class MainSettingsController : BaseMvpController<MvpView, MvpPresenter>() {
val title: TextView = title_whalemare
override fun getLayout(): Int {
return R.layout.controller_settings
}
}
tôi cố gắng tìm nó với kotlin extensions
, nhưng tôi có thể không phải vì tôi nhận được lỗi sau
Không ai trong số những ứng cử viên sau đây được áp dụng vì nhận loại không phù hợp
controller_settings.xml
<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="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/title_whalemare"/>
</LinearLayout>
Lỗi của tôi ở đâu?