Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Android build fails if build process includes 'install' step
Hi. I'm using Qt 5.1 with QtCreator 2.8, trying to deploy a trivial 'helloworld' application on my Android device. After setting up my project according to
And hitting build I get an error during the build process. The issue goes away if I remove or disable one of the Build Steps I added in my project: a make install. To clarify, when you set up a project you normally have two steps automatically added for building: qmake and make. I added another make step that calls "make install" and its this step that fails with the Android build.
All make install does is copy a few files to the build directory. This works fine on my desktop.
Why can't I use a make install build step? Is this a bug?
flaviomarcio last edited by
You can give more information.
This using linux or windows?
You have the build log?
You are trying to compile a project with Qtquick or QWidget?
- Arch Linux
- QtQuick with a simple qml file shown in QQuickView
Here's the relevant part of the build log. I pastebinned the full thing here (http://pastebin.com/raw.php?i=5JE5QK2x)
22:21:29: The process "/usr/bin/make" exited normally.
22:21:29: Starting: "/usr/bin/make" install
mkdir: cannot create directory '/libs': Permission denied
make: *** [install_target] Error 1
22:21:29: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project qquick_helloworld_embedded (kit: Android for arm (GCC 4.7, Qt 5.1.1))
When executing step 'Make'
22:21:29: Elapsed time: 00:01.@
if I am reading the error right you are trying to put something in /libs which would be in your root directory and you can't write there.
I didn't explicitly tell QtCreator to install anything in '/libs'. The Android kit is doing something or defaulting to something which results in that error. Like I said earlier, the same build process works with the default desktop kit (it even works with the blackberry kit).
paxl last edited by
I don't know if you found a solution but I ran into the same problem and here is how I did to fix it.
Here is my .pro :
@ TEMPLATE = lib
CONFIG += qt plugin
QT += quick
#include development files
TARGET = xbmc_plugin
DESTDIR = xbmc_plugin_Library
DESTDIRQML = qml_folder
INCLUDEPATH += $$PWD
deploy qml files to correct dir
qml_folder.files = $$OTHER_FILES
qml_folder.path = $$DESTDIR
And I would normally build my project by running qmake, make and then make install.
However when building for Android it seems that make install runs an extra step that copies your TARGET to $(INSTALL_ROOT)/libs/armeabi-v7a/
where INSTALL_ROOT has to be provided otherwise it uses nothing hence the /libs error.
I found two ways to solve the problem. You can either call your make install and specify the INSTALL_ROOT argument like that :
make INSTALL_ROOT="/home/lemire_p/work/tepee3d/android" install
or in my case just run make install_qml_folder which still moves my TARGET and resources to the path specified by DESTDIR.
In any case, I hope this might help you.