"network error" while building cordova for symbian
hey guys,
i've been playing with cordova (a cross platform mobile development library, for those who do not know). i made a few modifications in the files that are available at [URL="https://github.com/cordova/cordova-qt"]this link[/URL]. however, when i try to build it, i get this error:
Starting C:\middler\cordovaqt-build-simulator\release\cordovaqt.exe...
Using "C:/middler/cordovaqt-build-simulator/release" as working dir
C:/middler/cordovaqt-build-simulator/release/qml/main.qml: Network error
C:\middler\cordovaqt-build-simulator\release\cordovaqt.exe exited with code 0
i've been searching for so long, but have been unable to find a single helpful link. i've cleaned the project and run qmake on it and then built but it still keeps giving that same error.
any help would be appreciated.
Re: "network error" while building cordova for symbian
The link gives page not found reply.
Can you provide more info on this to be helpful
Re: "network error" while building cordova for symbian
This is because the impelementation in main.cpp is like this:
view->setSource(QUrl(QString("%1/qml/main.qml").arg(Cordova::instance()->workingDir())));
and it fails maybe because QUrl constructor uses %1 in non-unix(-alike) systems a bit strangely and outcome is not what you might want.
I fixed this by changing it to
view->setSource(QUrl("qml/main.qml"));
and it seems to work ok.
On the cordova.cpp you must also put:
m_workingDir = QApplication::applicationDirPath();
m_workingDir.cdUp(); <-- this
Otherwise cordova cannot load your 'xml' and 'www' dir.
Difficult? Just clone my repo: git://github.com/jvihrial/incubator-cordova-qt.git