Closed zhangzhenxi closed 1 year ago
This issue is only happens when: :app -> :lib1 -> :lib2 And all those modules all has a layout file with same name.
If there is no module :lib2(transive dependency layer less then three), then this issue won't happen.
Why do you have layouts with the same name in different modules? Only one will take effect in the end, right? Why not just keep one?
These libraries are basic components such as ListPage VideoPlayer and so on, I can use these components in app with a customized ui layout when necessary.
Since the kace plugin is compatible with the kotlin-extensions plugin by generating source code, it cannot support duplicate classes. Maybe you can try to use blackList, so that the app module or lib1 module does not generate code
Maybe I'll try some kotlinx.android.synthetic.main.${layout}.view
to ${package}.main.${layout}.view
thing
Here is an example:
Background
ProjectXXX has an Application module :app, and a library module :library :library2
:app depends on :library :library depends on :library2
There is a
activity_base_list.xml
layout file in each module(including app)Env
Issue
Build error because of dex merge failed Multiple layout files with the same name will generate multiple class(with same name) in one package:
kotlinx.android.synthetic.main
Excpect
Should compile without any error like kotlin-extensions plugin.