Hi All,
I have followed all the steps as mentioned in Debugging JavaScript in Qt Creator—AppStudio for ArcGIS | ArcGIS to debug the app studio app. Everything is fine but once i try to debug the app,it is not recognizing the framework and showing the below error -
Starting C:\Qt\Qt5.10.1\5.10.1\msvc2015_64\bin\qmlscene.exe...
file:///C:/Users/Rabi/ArcGIS/AppStudio/Apps/d0e72ccb693c4ba4a3dab25ee4818e4c/MyApp.qml:25 plugin cannot be loaded for module "ArcGIS.AppFramework": Cannot load library C:\Qt\Qt5.10.1\5.10.1\msvc2015_64\qml\ArcGIS\AppFramework\AppFrameworkPlugin.dll: The specified procedure could not be found.
C:/Qt/Qt5.10.1/5.10.1/msvc2015_64/bin/qmlscene.exe exited with code -1
If any idea or suggestions, please let me know.
Code is-
import QtQuick 2.6
import QtQuick.Controls 2.1
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.1
import QtPositioning 5.3
import QtSensors 5.3
import ArcGIS.AppFramework 1.0
import ArcGIS.AppFramework.Controls 1.0
import Esri.ArcGISRuntime 100.1
//------------------------------------------------------------------------------
App {
id: app
width: 414
height: 736
property real scaleFactor: AppFramework.displayScaleFactor
//header bar
Rectangle {
id: titleRect
anchors {
left: parent.left
right: parent.right
top: parent.top
}
height: 50 * AppFramework.displayScaleFactor
color: app.info.propertyValue("titleBackgroundColor", "purple")
Text {
id: titleText
anchors.centerIn: parent
text: app.info.title
color: app.info.propertyValue("titleTextColor", "white")
font {
pointSize: 18
}
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
maximumLineCount: 2
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
}
}
MapView {
id:mapView
property real initialMapRotation: 0
anchors {
left: parent.left
right: parent.right
top: titleRect.bottom
bottom: parent.bottom
}
rotationByPinchingEnabled: true
zoomByPinchingEnabled: true
locationDisplay {
positionSource: PositionSource {
}
}
// add a basemap
Map{
id:map
//BasemapTopographic{}
//BasemapStreets {}
BasemapImagery {}
initialViewpoint: ViewpointCenter {
id:initialViewpoint
center: Point {
x: -11e6
y: 6e6
spatialReference: SpatialReference {wkid: 102100}
}
targetScale: 9e7
}
}
// map control buttons
Column{
id:buttons
spacing: 5 * scaleFactor
anchors {
verticalCenter: parent.verticalCenter
right: parent.right
margins: 5 * scaleFactor
}
Button{
id:homeButton
Image{
source: "./images/home.png"
height: 40 * scaleFactor
width : height
anchors.centerIn: parent
}
height: 40 * scaleFactor
width : height
onHoveredChanged: hovered ? homeButton.opacity = 1 : homeButton.opacity = .5;
opacity: .5
onClicked:{
mapView.setViewpointWithAnimationCurve(map.initialViewpoint, 1.0, Enums.AnimationCurveEaseInOutCubic)
mapView.setViewpointRotation(mapView.initialMapRotation)
}
}
Button{
id:locationButton
Image{
source:"./images/location.png"
height: 30 * scaleFactor
width: height
anchors.centerIn: parent
}
onHoveredChanged: hovered ? locationButton.opacity = 1 : locationButton.opacity = .5;
height: 40 * scaleFactor
width : height
opacity: .5
onClicked: {
if (!mapView.locationDisplay.started) {
mapView.locationDisplay.start()
mapView.locationDisplay.autoPanMode = Enums.LocationDisplayAutoPanModeRecenter
} else {
mapView.locationDisplay.stop()
}
}
}
}
}
}
//------------------------------------------------------------------------------
Hi Manish,
I have few questions for you. This will help me to narrow down the issue that you experiencing.
1. Did you run the script located at C:\Users\Rabi\Applications\ArcGIS\AppStudio\sdk\ideintegration\post-install.bat before you opened the project on Qt Creator?
Try running on Admin mode
2. Can you confirm whether you have the correct setup in place by checking if all the files are present in the following the location?
C:\Qt\Qt5.10.1\5.10.1\msvc2015_64\qml\ArcGIS\
3. Are you trying to run the project on debug or release mode?
We recommend using release mode.
Best,
Siddesh
Siddesh Pillai wrote:
Hi Manish,
I have few questions for you. This will help me to narrow down the issue that you experiencing.
1. Did you run the script located at C:\Users\Rabi\Applications\ArcGIS\AppStudio\sdk\ideintegration\post-install.bat before you opened the project on Qt Creator?
Try running on Admin mode
2. Can you confirm whether you have the correct setup in place by checking if all the files are present in the following the location?
C:\Qt\Qt5.10.1\5.10.1\msvc2015_64\qml\ArcGIS\
3. Are you trying to run the project on debug or release mode?
We recommend using release mode.
Best,
Siddesh
Hi Siddesh,
Thanks a lot for your revert. I am mentioning my comments as below-
1. Once i have run this script (C:\Users\Rabi\Applications\ArcGIS\AppStudio\sdk\ideintegration\post-install.bat)directly through command prompt then it did not copy ArcGIS and Esri Folder at path(C:\Qt\Qt5.10.1\5.10.1\msvc2015_64\qml\ArcGIS\) Then i have set directory path to batch file like-
and executed batch file again,Now files are appearing at the given path as-
neither app is working on debug mode nor in release mode it is showing error-
Please help.
Regards,
Manish Sharma
Hi Manish,
Thanks for working through the steps.
Based on your console log, it seems that the runtime module has not configured properly.
Can you try running the Advanced Configuration Tool located at C:\Users\<user>\Applications\ArcGIS\AppStudio\bin\AdvancedConfiguration.exe and provide the qmake path for msvc_2015 kit with C:\Qt\Qt5.9.1\5.9.1\msvc2015_64\bin\qmake.exe ? Give this a shot and let know if it still doesn't work.
Best,
Siddesh
Hi Siddesh,
Thanks for your reply, i am adding few screen shots again as suggested.
Still it showing the below error-
Kindly check the same. Appreciate your efforts, please suggest.
Regards,
Manish Sharma
Hi Manish,
>Starting C:\Qt\Qt5.10.1\5.10.1\msvc2015_64\bin\qmlscene.exe...
file:///C:/Users/Rabi/ArcGIS/AppStudio/Apps/d0e72ccb693c4ba4a3dab25ee4818e4c/MyApp.qml:25 plugin cannot be loaded for module "ArcGIS.AppFramework": Cannot load library C:\Qt\Qt5.10.1\5.10.1\msvc2015_64\qml\ArcGIS\AppFramework\AppFrameworkPlugin.dll: The specified procedure could not be found.
AppStudio 2.1(including AppFrameworkPlugin.dll) was built using Qt5.9.1. I think qmlscene.exe from Qt5.10.1 installation is not able to load the AppFrameworkPlugin.dll built with Qt5.9.1. This is most probably a Qt bug since the Qt Framework is supposed to be backward compatible.
It looks like you've already switched from using Qt5.10.1 to Qt5.9.1.
Can you check if Esri folder is present in C:\Qt\Qt5.9.1\5.9.1\msvc2015_64\qml? If not, running the post_install script again should resolve the error in the screenshot you've shared above.
Also copy the 2 Runtime dlls from UserHome\Applications\ArcGIS\AppStudio\sdk\windows\x64\lib to C:\Qt\Qt5.9.1\5.9.1\msvc2015_64\bin.
FYI. There's a known bug in AdvancedConfiguration tool. It does not copy the ESRI folder correctly to Qt install location.
cc: Siddesh Pillai
Thanks
Shobana