Select to view content in your preferred language

Error compiling basic template ArcGIS QML Android 100.14

1422
7
Jump to solution
05-02-2022 10:41 AM
HomeroOriaAguilera
Emerging Contributor

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.

Spoiler
error: No rule to make target 'C:\Users\homer\Documents\build-untitled5-Android_Qt_5_15_8_Clang_Multi_Abi-Debug\android-build\libs/libs/RuntimeIndoors.jar', needed by 'all'. Stop.

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

0 Kudos
1 Solution

Accepted Solutions
JustinSteventon
Occasional Contributor

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.

View solution in original post

0 Kudos
7 Replies
JamesBallard1
Esri Regular Contributor

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.

0 Kudos
HomeroOriaAguilera
Emerging Contributor

I see. I use qmake. Let me try it and I will let you know.

0 Kudos
JustinSteventon
Occasional Contributor

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.

0 Kudos
JamesBallard1
Esri Regular Contributor

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

 

0 Kudos
JustinSteventon
Occasional Contributor

It definitely did not exist on my system, but I disabled the C++ components. Not sure if that is related.

JamesBallard1
Esri Regular Contributor

@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?

HomeroOriaAguilera
Emerging Contributor

Hi, @JamesBallard1, yes! Works like a charm!

0 Kudos