Android Question Can I use both XUI and XUI View in same project?

Binary01

Member
Licensed User
Hello,

I already used xCustomListView (XUI Version 1.90) in my project.

Now I also add Library (XUI Views Version 1.87) to use B4XDialog.
After I run my app, it show error:

(RuntimeException) java.lang.RuntimeException: Field mylistview was declared with the wrong type.

I found that both libraries use same variable xui. I think these XUI libraries are not compatable.

B4X:
Sub Process_Globals
    Private xui As XUI
End Sub

Can I use these two library in the same project?
How can I fix it?

Thanks
 

DonManfred

Expert
Licensed User
: Field mylistview was declared with the wrong type.
you probably are using a layout with an CustomListview inside.
Or you are using a layout with a xCustomListview at a point where you were using the class. And now you are using the Library, not the class?

Try to edit the layout, remove the mylistview and add it again giving the same name. Save the layout. Try again.

PD: To answer the question. The CAN be used together.
 
Upvote 0

Binary01

Member
Licensed User
you probably are using a layout with an CustomListview inside.
Or you are using a layout with a xCustomListview at a point where you were using the class. And now you are using the Library, not the class?

Try to edit the layout, remove the mylistview and add it again giving the same name. Save the layout. Try again.

PD: To answer the question. The CAN be used together.

Thanks I try to fix it as you suggest.
 
Last edited:
Upvote 0

Binary01

Member
Licensed User
Thanks DonManfred. You're genius!
Your advice is quick and useful to fix my error.

I'm away from my computer for a few hours.
Now I remove customlistview class and only use library. Project is run without error.
 
Upvote 0
Top