Kotlin Android Extension layouts from library module cannot be resolved

倾然丶 夕夏残阳落幕 提交于 2019-12-04 23:11:40

This seems to a good question at first. I reproduce the same problem in my current project.

  1. I have added the library module via

    implementation project(':mylibrary')

  2. Added the library module in the project.

  1. Created a layout/view in the library module aka common module.

  1. Included in the main layout

  1. And finally, I am able to change it programmatically.

    import kotlinx.android.synthetic.main.activity_home.* import kotlinx.android.synthetic.main.item_library.*

There might be some problem with the built environment. Note: I am using latest build version and android and kotlin plugins.

Do update your logs for further clarification about your problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!