我有一些视图的布局,其中一个有 idtitle_whalemare
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
}
}
我尝试用 找到它kotlin extensions
,但我不能,因为我收到以下错误
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>
我的错误在哪里?