Encountered a problem when trying to build a sample Qt project for Android

The error message is

 aapt: error while loading share libraries: libz.so.1: cannot open shared object file: No such file or directory

The cause of the problem is my system (Fedora 22) is 64bit while Android build for x86 required 32bit libraries.

To solve this:

Install libz using:

sudo dnf install zlib.i686

and it’s working fine now! Happy coding!