Hi. With the recent version of Qt Runtime SDK 100.14, I create an empty ArcGIS QML project created with the wizard to test the Android compilation.
Howeever I got this error.
It seems that RuntimeIndors.jar is missing, but this file is inside of ArcGIS SDK.
Other Android compilations with other versions of the SDK work fine.
Compiler Kit. Android Qt.5.15.8 Clang Multi ABI
Qt. 5.15.8
Qt Creator. 7.0.1
OS. Windows 10 22000.652
Solved! Go to Solution.
I hit this as well and noticed a few things:
1. On Windows, RuntimeIndoors.jar is not part of the SDK installation. It is on MacOS though, so I copied it from there to my ArcGIS SDKs\Qt100.14\sdk\android\jar folder. Note that the "jar" folder does not exist on Windows, so you have to create it.
2. In arcgis_runtime_qml.pri, the following line is wrong:
$${QMAKE_COPY} $${SDK_INSTALL_DIR}/sdk/$${PLATFORM}/jar/RuntimeIndoors.jar $$ANDROID_LIBS_DIR $$escape_expand(\n\t)
Instead, it should be:
$${QMAKE_COPY} $$shell_path($$shell_quote($${SDK_INSTALL_DIR}/sdk/$${PLATFORM}/jar/RuntimeIndoors.jar)) $$ANDROID_LIBS_DIR $$escape_expand(\n\t)
3. I also had to remove the extra "libs" from this line:
RuntimeNativeJar.target = $$ANDROID_LIBS_DIR/libs/RuntimeIndoors.jar
Hope this helps.
Hi @HomeroOriaAguilera .
That is a new supporting file with 100.14. It is required to be deployed with all apps. We have this logic in our .pri file:
ANDROID_LIBS_DIR = $$shell_path($$OUT_PWD/android-build/libs)
RuntimeNativeJar.target = $$ANDROID_LIBS_DIR/libs/RuntimeIndoors.jar
RuntimeNativeJar.commands = \
$$sprintf($$QMAKE_MKDIR_CMD, $$ANDROID_LIBS_DIR) $$escape_expand(\n\t) \
$${QMAKE_COPY} $${SDK_INSTALL_DIR}/sdk/$${PLATFORM}/jar/RuntimeIndoors.jar $$ANDROID_LIBS_DIR $$escape_expand(\n\t)
target.depends += RuntimeNativeJar
QMAKE_EXTRA_TARGETS += RuntimeNativeJar
ALL_DEPS += $${RuntimeNativeJar.target}
That is what happens to deploy the file with the app. Building Android on Windows is tricky, and we've struggled with that combination on the team in the past. It's possible the command may need Windows separators, or something similar.
Here's what I recommend:
1. See if commenting that section out gets your app building. This will narrow down the problem to those specific steps.
2. Tinker with those commands and see if you can get it working. There could be something buggy or inconsistent with the make commands on Windows that is problematic.
Let us know how it goes.
Also, can you confirm if you are using qmake or CMake? CMake would be something else to troubleshoot if that's the case.
I see. I use qmake. Let me try it and I will let you know.
I hit this as well and noticed a few things:
1. On Windows, RuntimeIndoors.jar is not part of the SDK installation. It is on MacOS though, so I copied it from there to my ArcGIS SDKs\Qt100.14\sdk\android\jar folder. Note that the "jar" folder does not exist on Windows, so you have to create it.
2. In arcgis_runtime_qml.pri, the following line is wrong:
$${QMAKE_COPY} $${SDK_INSTALL_DIR}/sdk/$${PLATFORM}/jar/RuntimeIndoors.jar $$ANDROID_LIBS_DIR $$escape_expand(\n\t)
Instead, it should be:
$${QMAKE_COPY} $$shell_path($$shell_quote($${SDK_INSTALL_DIR}/sdk/$${PLATFORM}/jar/RuntimeIndoors.jar)) $$ANDROID_LIBS_DIR $$escape_expand(\n\t)
3. I also had to remove the extra "libs" from this line:
RuntimeNativeJar.target = $$ANDROID_LIBS_DIR/libs/RuntimeIndoors.jar
Hope this helps.
Thanks @JustinSteventon. I'll log an internal issue for those second two you mentioned. As for problem 1, RuntimeIndoors.jar is part of the Windows SDK installation with 100.14. If that's not there, I'd like to know more about that.
I just installed 100.14 on Windows fresh and it is sitting here:
C:\Program Files (x86)\ArcGIS SDKs\Qt100.14\sdk\android\jar\RuntimeIndoors.jar
It definitely did not exist on my system, but I disabled the C++ components. Not sure if that is related.
@JustinSteventon thank you, that was the missing piece of the puzzle. I can reproduce it now with that change. We'll fix this for 100.15.
Also, @HomeroOriaAguilera do the workarounds @JustinSteventon mentioned above solve this for you?
Hi, @JamesBallard1, yes! Works like a charm!