"Esri.ArcGISRuntime is not installed" problem

2008
3
06-07-2018 07:21 PM
GabeLevy
New Contributor II

Hi,

I just downloaded and installed ArcGISRuntime SDK for Qt on Fedora 27. I plan to develop only for the Linux desktop so I didn't tick any mobile device options at install/postInstall time.

I followed the instructions for installation on Linux.

Then I downloaded an example solution for this ArcGIS DevLabs example https://developers.arcgis.com/labs/qt/display-a-map-while-offline/

It built w/o any complaints but when I tried to debug-run it would exit with the message "module Esri.ArcGISRuntime is not installed".

Also the "import" lines in the QML file pulling in Esri.ArcGISRuntime module stayed red-underlined indicating it as "not found".

I tried rerunning the "postInstaller" but no avail. Then I tried to reinstall the entire ArcGISRuntime SDK but again, no difference.

 So after some research I found that the location of the ArcGISRuntime plugins can/should be specified in the QML_IMPORT_PATH in the Qt .pro file so I added the following line to the project file:

     QML_IMPORT_PATH += ~/ArcGIS/runtime_sdk/qt100.2.1/sdk/Linux/x64/qml

The QtCreator now stopped underlining the import line and hovering over the import line shows that it did locate the module and is showing its path.

However, debug-run still fails with the same message  "module Esri.ArcGISRuntime is not installed".

I searched on the internet but noting more than what I've already done comes up.

The Esri instructions say that the postInstaller would set up everything in the QtCreator to work with the ArcGISRuntime.

But what about the debugee run-time when the Qt Framework is resolving the modules to load?

Is there any ENV variable that needs to be updated with the QML module location?

If so which one is it and which location should be added?

Any help would be immensely appreciated, thanks.

0 Kudos
3 Replies
GabeLevy
New Contributor II

I found out the problem.

For the debugee at run-time to find the Esri modules (or any other custom QML modules for that matter), the path must be added to the QML2_IMPORT_PATH environment variable, not the QML_IMPORT_PATH, which is what I was doing.

Once I added the path in my OP to this env variable, everything sprung to life.

I suppose it would be a helpful piece of info in the installation instructions to have.

Even if the installer/postInstaller was meant to do it, obviously sometimes for some reasons it may not happen, so it would be helpful for the devs to know some extra info to rectify the problems.

Anyways, thanks.

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Gabe-

The dev lab solution contains some older, out of date qmake lines. Our new should templates setup the QML Import Paths correctly. We will have this fixed shortly. Apologies for the confusion. 

FYI, we discuss the options you have to include the SDK into your project here - Qt SDK best practices—ArcGIS Runtime SDK for Qt | ArcGIS for Developers 

You can either include our PRI file that we ship or you can use the environment variable like you did.

Thanks,

Lucas

GabeLevy
New Contributor II

Thank you, Lucas, for the additional info; I'll update my projects according to your recommendations.

Cheers

Gabe

0 Kudos