Closed mtotschnig closed 2 years ago
That's the intended behaviour when calling build on a subclass that does not implement/overwrite the method. See #31 and issues referenced there.
(In case I misunderstood that's because you didn't provide the information requested in the issue template)
Sorry for the incomplete information. The error is raised on calls on classes that implement the build method, for example: SimpleListDialog.build() or SimpleInputDialog.build()
Okay then it's not intended 😄
I'm afraid I have not used Kotlin so I don't think I can fix this on my own.
Nevertheless, what exactly did you call that raised the error (complete minimal not-working example)? Was it SimpleInputDialog.build();
?
Maybe there are some special precautions to be done when performing lint checks for Kotlin?
This can be solved by using only build()
and importing whatever you're going to use. That means if you're using 'SimpleColorDialog.build()' then just use 'build()' and import 'SimpleColorDialog'.
This will work in Kotlin. What will not work is that your project won't compile because of duplicate AndroidManifest.xml
which I'm facing right now and also the reason why I'm here.
Thank you @sharmanitin0497 for the hint. The manifest problem sounds like an independent issue, would you mind opening a dedicated issue and give some more details about it?
And for multiple Dialogs, you can use aliases as
import eltos.simpledialogfragment.color.SimpleColorDialog.build as SimpleColorDialog
import eltos.simpledialogfragment.form.SimpleFormDialog.build as SimpleFormDialog
Then, call them just like SimpleColorDialog().
or SimpleFormDialog().
. This way you don't have to use build()
.
But, the reason I came here is I can't build the project because it shows Cause: duplicate entry: AndroidManifest.xml
in Kotlin even when the jar file doesn't contain a manifest file. It will work if I remove this library. Why?
The BuildNotImplemented lint check raises an error for a call to any of the dialogs' build method from a Kotlin class:![Bildschirmfoto 2019-09-07 um 13 48 46](https://user-images.githubusercontent.com/1485456/64474537-7f15ec00-d176-11e9-910b-2199461b0d1c.png)