[Qbs] Selecting target architecture for Android

Alberto Mardegan mardy at users.sourceforge.net
Sun May 22 21:57:20 CEST 2022

Hi there!
   So far I've built my Android application using Qt 5.12, for the arm 
architecture only, and everything has worked fine.

Today I tried migrating to 5.15, which supports multiarch, and I'm 
getting an issue: after building all the files for all the four 
supported architectures ("Qt with multiple abi detected: 
'armeabi-v7a,arm64-v8a,x86,x86_64'"), I get an error during the install 

ERROR: Cannot install files 
to the same location 
If you are attempting to install a directory hierarchy, consider using 
the qbs.installSourceBase property.

where MapperoCore is a DynamicLibrary. But actually I didn't spend time 
investigating this (and neither should you), because I don't really care 
about other architectures: I would be happier if my Android package 
contained just the armv7 binaries :-)

But how do I do that? I tried specifying "qbs.architectures:armeabi-v7a" 
to QBS's command line, but then it looks like it cannot find the Qt 

Build graph does not yet exist for configuration 'default'. Starting 
from scratch.
Resolving project for configuration default
Setting up Qt at '/home/mardy/Qt/5.15.2/android//bin/qmake'...
Qt with multiple abi detected: 'armeabi-v7a,arm64-v8a,x86,x86_64'
Configuring abi 'armeabi-v7a'...
Configuring abi 'arm64-v8a'...
Configuring abi 'x86'...
Configuring abi 'x86_64'...
Qt was set up successfully.
ERROR: /home/mardy/src/git/mappero/lib/Mappero/Mappero.qbs:3:1 Error 
while handling product 'MapperoCore':
/home/mardy/src/git/mappero/lib/Mappero/Mappero.qbs:62:5 Module Qt.core 
could not be loaded.
/home/mardy/src/git/mappero/lib/Mappero/Mappero.qbs:63:5 Module Qt.gui 
could not be loaded.

How do I tell QBS to just use a single architecture for Android? If 
possible, I'd like doing that from the command line, since the project 
is multi platform and I wouldn't like to clobber the QBS project file 
for this.

Thanks to whoever can help!


http://www.mardy.it - Geek in un lingua international

More information about the Qbs mailing list