Hi,
What I'm doing on Android is the following:
I build a qml ui and some corresponding c++ and inline js code that make sure that the qml ui can communicate with the android java layer through the android webview utilizing webchannel messageing. See: https://github.com/r0ller/qwa/tree/main/qmlwasm1
Files:
main.qml (just the ui logic)
main.cpp (opening webchannel port)
messageboard.cpp (sending/receiving messages through webchannel port)
The java layer passes the call to a c/c++ backend lib via JNI and the returned response is sent back to qml via webmessage channel. The corresponding code:
https://github.com/r0ller/qwa/blob/main/Android/qmlwasm1/app/src/main/java/com/bitroller/qmlwasm1/MainActivity.java
All that works fine, the error does not appear in the Android but only in the nodejs use case when reloading the client from the nodejs server. However, the ui part what gets loaded from the server is the same what I load in the webview on Android. I also don't get any errors when the project is built with the same qml ui as native.
By the way, you can find both the apk and the nodejs code in the repo so running the nodejs variant is just issuing "node index.js" in the qwa_node directory after cloning ;) Installing the apk of course is a few clicks and taps more.
(Yesterday I added a springanimated rect to the qml ui which I did not copy over to the android project so there's a difference but that's not the point here.)
BR,
r0ller