I am trying integrate a webview in our application, it works well under Windows, but I have some issue to make it works on Android.
I have the following error message:
Main.qml:2:1: module "QtWebView" is not installed
I don't understand cause the minibrowser sample works fine.
For Windows I use a component with import QtWebkit 3.0 and import QtWebView 1.0 for Android.
It seems the issue come from the generated manifest that doesn't contains:
jar/QtAndroidWebView.jar:jar/QtAndroidWebView-bundled.jar for the meta data android.app.load_local_jars
That the only difference I found between the minibrowser sample and our application.
QT += webengine
DEFINES += QT_WEBVIEW_WEBENGINE_BACKEND
in our .pro file and:
#endif // QT_WEBVIEW_WEBENGINE_BACKEND
After the QGuiApplication creation.
I certainly missed something, but I don't see what.
I tried to modify the manifest directly but it doesn't solve the issue.
Are still missing in the apk.
If I add them in my apk (with 7-zip), I just can't install it.
As I know webkit is not supported for Android yet. You have to use JNI (Java Native Interface) for that.
Hi, did you include this in your main.cpp ???
#ifdef QT_WEBVIEW_WEBENGINE_BACKEND #include <QtWebEngine> #endif // QT_WEBVIEW_WEBENGINE_BACKEND
for me it's working on android (Htc Desire , kitkat 4.4)
There's something that needs some clarification here:
on iOS and Android, neither QtWebKit nor QtWebEngine are supported since both platforms enforces the use of their own provided web element.
Here enters the QtWebView module which is not the same thing as the QtWebKit QWebView nor the QtWebEngine QWebEngineView. QtWebView provides a minimal wrapper around the native web view of both platforms.