Qt Qml Android studio plugin is crashing
-
wrote on 22 Mar 2025, 19:04 last edited by
I had installed the Qt QML Android Studio extension to add QML to an Android Studio project for testing.
It is a JetPack compose project and I'm using the NavigationBar for better UX. The issue is that I need the Scaffold content property to display QML pages that I am loading using QtQuickView's .loadContent() method.
It seems to work the initially but when I change navigation routes the application crashes with the error:
Now, ChatGPT fixed this issue like so:
The fix seems to make matters worse because now when you navigate to the next route the application crashes and StackTrace is somewhat gibberish.
Has anyone else encountered this??
-
wrote on 23 Mar 2025, 10:31 last edited by Scott Izi
-
So, I figured out the answer, although I am not sure it's efficient. The key is to have a new QtQuickView for every composable item. You can forget about the ChatGPT part, and I recommend checking this StackOverflow answer as well.
wrote on 23 Mar 2025, 12:24 last edited by@Scott-Izi the StackOverflow is here
1/3