Unsolved QSslSocket: cannot resolve SSLv2_server_method - ubuntu and android
-
I want create app in qml which be getting information from server by JSON.
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Hello World") Item { width: 200 height: 150 ListModel { id: model } ListView { id: listview anchors.fill: parent model: model delegate: Text { text: jsondata } } Button { anchors.bottom: parent.bottom width: parent.width text: "GET Data" onClicked: { function getData() { var xmlhttp = new XMLHttpRequest(); var url = "http://samplechat.firebaseio-demo.com/users/jack/name.json"; xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { myFunction(xmlhttp.responseText); } } xmlhttp.open("GET", url, true); xmlhttp.send(); } function myFunction(json) { var obj = JSON.parse(json); listview.model.append( {jsondata: obj.first +" "+ obj.last }) } getData(); } } } }
But i can't connect with server because i have an error of course.
I had error with database driver. I had to compile driver from source.
What happened to QT this time?
My target platform is android so what i should can that do (and why this is not simple)?
I have OpenSSL 1.0.2g 1 Mar 2016 -
Sorry that I boost this thread but My application must connect with server otherwise my application would not make sense.
This is important for me.
What i can do?
QSslSocket: cannot resolve SSLv2_server_method -
You are probably missing the SSL library in order to make https:// requests. You can verify this by testing if XMLHttpRequest works with URLs that do not use https.
For Android, it is currently required to manually package the SSL library as described here: http://doc.qt.io/qt-5/opensslsupport.html
With V-Play Engine you can avoid having to build and provide SSL for Android, V-Play has SSL already bundled since version 2.10.0.