BottomNavigationLayout icon indicating copy to clipboard operation
BottomNavigationLayout copied to clipboard

Inflation error, ClassCastException - BridgeContext & AppCompatActivity.

Open JonathanMerritt opened this issue 8 years ago • 4 comments

The error is caught within the Android Studio Design window, and after a run of the application. Builds fine.

I am not sure what is causing it, I'm running it on a LP device. If you need any more info just let me know.

I've put the trace on Dropbox. https://www.dropbox.com/s/0z78cb7drrav9ju/BottomNavigationLayout_stackTrace_inflateError.txt?dl=0

JonathanMerritt avatar Apr 14 '16 18:04 JonathanMerritt

@JonathanMerritt Thanks for submitting the issue. This is because the layout editor passes BridgeContext in edit mode. The library is not optimized for edit mode yet, therefore you might notice it often not displaying correctly or not displaying at all in the editor. If you come across other cases where the lib crashes the layout editor, please ping me with the stacktrace.

NikolaDespotoski avatar Apr 14 '16 20:04 NikolaDespotoski

@NikolaDespotoski no problem.

Excuse my ignorance, but the edit mode thing is just causing it in the Design window of AStudio or will it also cause the error when the application is ran?

JonathanMerritt avatar Apr 14 '16 20:04 JonathanMerritt

@JonathanMerritt No, it wont. Applications do not have BridgeContext.

NikolaDespotoski avatar Apr 14 '16 20:04 NikolaDespotoski

Alright, so I suppose I need to take a better look at that run crash log then...

Sorry about the confusion. If it is connected to the library, I'll be sure to let you know. I foolishly assumed they were connected.

Thanks.

JonathanMerritt avatar Apr 14 '16 20:04 JonathanMerritt