Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BuildNotImplemented lint check: false error when dialog is used from Kotlin #57

Closed
mtotschnig opened this issue Sep 7, 2019 · 6 comments
Labels
help wanted workaround available A workaround for the issue is available

Comments

@mtotschnig
Copy link
Contributor

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

@eltos
Copy link
Owner

eltos commented Sep 9, 2019

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)

@eltos eltos closed this as completed Sep 9, 2019
@mtotschnig
Copy link
Contributor Author

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()

@eltos
Copy link
Owner

eltos commented Sep 30, 2019

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?

@eltos eltos reopened this Sep 30, 2019
@sharmanitin0497
Copy link

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.

@eltos
Copy link
Owner

eltos commented Apr 4, 2020

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?

@eltos eltos added the workaround available A workaround for the issue is available label Apr 4, 2020
@Fauzdar1
Copy link

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?

@eltos eltos changed the title BuildNotImplemented lint check false error when dialog is used from Kotlin BuildNotImplemented lint check: false error when dialog is used from Kotlin Jun 12, 2021
@eltos eltos closed this as completed in 608ac62 Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted workaround available A workaround for the issue is available
Projects
None yet
Development

No branches or pull requests

4 participants