QtWebView issue
-
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.
PS :
I add:
@
qtHaveModule(webengine) {
QT += webengine
DEFINES += QT_WEBVIEW_WEBENGINE_BACKEND
}
@in our .pro file and:
@
#ifdef QT_WEBVIEW_WEBENGINE_BACKEND
QtWebEngine::initialize();
#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.
libQt5WebView.so
libqml_QtWebView_libdeclarative_webview.so
Are still missing in the apk.If I add them in my apk (with 7-zip), I just can't install it.
-
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.
PS :
I add:
@
qtHaveModule(webengine) {
QT += webengine
DEFINES += QT_WEBVIEW_WEBENGINE_BACKEND
}
@in our .pro file and:
@
#ifdef QT_WEBVIEW_WEBENGINE_BACKEND
QtWebEngine::initialize();
#endif // QT_WEBVIEW_WEBENGINE_BACKEND
@After the QGuiApplication creation.
I certainly missed something, but I don't see what.
@Flamaros :
As I know webkit is not supported for Android yet. You have to use JNI (Java Native Interface) for that.Reference:
http://qt-project.org/qt5/qt52 -
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.
PS :
I add:
@
qtHaveModule(webengine) {
QT += webengine
DEFINES += QT_WEBVIEW_WEBENGINE_BACKEND
}
@in our .pro file and:
@
#ifdef QT_WEBVIEW_WEBENGINE_BACKEND
QtWebEngine::initialize();
#endif // QT_WEBVIEW_WEBENGINE_BACKEND
@After the QGuiApplication creation.
I certainly missed something, but I don't see what.
-
@Flamaros :
As I know webkit is not supported for Android yet. You have to use JNI (Java Native Interface) for that.Reference:
http://qt-project.org/qt5/qt52@yogeshpatel23
http://doc.qt.io/qt-5/qtwebview-index.html
The WebView is currently supported on the following platforms: Android and iOS. -
Hi,
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.