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
IllegalArgumentException: class java.lang.Object is not an interface #159
Comments
Thanks for reporting. |
Sorry I forgot to mention, it's version 2.0.1 |
Could you please try it with latest 3.0.0-SNAPSHOT and let me know whether or not this issue still occurs in 3.0.0-SNAPSHOT |
My code does not compile with 3.0.0-SNAPSHOT, it looks like BaseMvpViewStateDelegateCallback no longer exists |
I think it has been renamed to |
It doesn't crash in 3.0.0-SNAPSHOT, I see that you catch the exception in MvpNullObjectBasePresenter's constructor |
Thanks for your feedback. So it's not crashing, but it should crash since the view is not implementing the view interface, right? or does base class you extend from implement |
It's not crashing, but com.hannesdorfmann.mosby.mvp.MvpActivity does implement MvpView |
Ok, I have to dive into the code again to verify whether or not this is the desired behavior. Just to sum it up: You have a |
Yes, that's the scenario. Some details
|
Got it! I have to verify the source code ... Regarding proguard, I guess a Miguel Aragues notifications@github.com schrieb am Di., 6. Sep. 2016 um
|
Thanks to you for the time you devote to the community! |
I have same error when tryed to add parametr to my extention of MvpView interface. I tryed to compile with 3.0.0-SNAPSHOT, but gradle cant find it |
Can you please show me a code snipped of your view interface and presenter
class (basically I'm only interested in the interface / class definition)
Yuri <notifications@github.com> schrieb am Mi., 4. Jan. 2017, 22:46:
… I have same error when tryed to add parametr to my extention of MvpView
interface. I tryed to compile with 3.0.0-SNAPSHOT, but gradle cant find it
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#159 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAjnro5mKT3P5pZ6M1IRIvfgKQ0hokqkks5rPBNCgaJpZM4J146O>
.
|
My base interface looks like
I also create BaseListPresenter
And finaly create concrete presenter so:
where RecentArticles interface is
And it works until I try to replace fragement or rotate screen, after fragment try to destoy them self. Then onDestroy called and an error. that mentioned previously in this issue occures |
@mohaxspb I tried to reproduce your issue, but I can't reproduce it. I have added a unit test with your interface specifications, but it is not crashing. Could you please take a look here and verify that the classes / interface are equal to what you have: and the corresponding test: Could you also post your stacktrace here? |
This stacktrace is shown when attempting to detach an Activity that uses MvpNullObjectBasePresenter but does not implement any Interface
I feel that the error message could be improved by checking in MvpNullObjectBasePresenter if the class to be detached implements MvpView, but I'm not sure if that's the best way, I haven't dig too much into Mosby code
Also, this error is only happening in release version with ProGuard. It's been in development like that for months and it hasn't crashed.
The text was updated successfully, but these errors were encountered: