Qt for Android : QtCreator build/deploy error when executing step “Build Android APK”



  • Hi,

    Like I say on Stack Overflow here, I can't figure out why I get the following error when I build a simple basic c++ project for Android in Qt Creator :

     10:01:29: Starting: "/usr/bin/make" 
     /home/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/android-ndk-r10e/platforms/android-9/arch-arm/ -Wl,-soname,libtestAndroid.so -Wl,-rpath=/home/Qt5.5.1-for-android/5.5/android_armv5/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libtestAndroid.so main.o mainwindow.o moc_mainwindow.o   -L/home/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi -L/home/android-ndk-r10e/platforms/android-9/arch-arm//usr/lib -L/home/Qt5.5.1-for-android/5.5/android_armv5/lib -lQt5Widgets -L/opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi -L/opt/android/ndk/platforms/android-9/arch-arm//usr/lib -lQt5Gui -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
     10:01:29: The process "/usr/bin/make" exited normally.
     10:01:29: Removing directory /home/qt-android-projects/testandroid/build/android-build
     10:01:29: Starting: "/usr/bin/make" INSTALL_ROOT=/home/qt-android-projects/testandroid/build/android-build install
     /home/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/android-ndk-r10e/platforms/android-9/arch-arm/ -Wl,-soname,libtestAndroid.so -Wl,-rpath=/home/Qt5.5.1-for-android/5.5/android_armv5/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libtestAndroid.so main.o mainwindow.o moc_mainwindow.o   -L/home/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi -L/home/android-ndk-r10e/platforms/android-9/arch-arm//usr/lib -L/home/Qt5.5.1-for-android/5.5/android_armv5/lib -lQt5Widgets -L/opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi -L/opt/android/ndk/platforms/android-9/arch-arm//usr/lib -lQt5Gui -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
     install -m 755 -p libtestAndroid.so /home/qt-android-projects/testandroid/build/android-build/libs/armeabi/libtestAndroid.so
     Makefile:1707: recipe for target 'install_target' failed
     install: cannot stat 'libtestAndroid.so': No such file or directory
     [install_target] Error 1 (ignored)
     11:41:30: The process "/usr/bin/make" exited normally.
     11:41:30: Removing directory /home/qt-android-projects/testandroid/build/android-build
     11:41:30: Starting: "/usr/bin/make" INSTALL_ROOT=/home/qt-android-projects/testandroid/build/android-build install
     /home/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/android-ndk-r10e/platforms/android-9/arch-arm/ -Wl,-soname,libtestAndroid.so -Wl,-rpath=/home/Qt5.5.1-for-android/5.5/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libtestAndroid.so main.o mainwindow.o moc_mainwindow.o   -L/home/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/home/android-ndk-r10e/platforms/android-9/arch-arm//usr/lib -L/home/Qt5.5.1-for-android/5.5/android_armv7/lib -lQt5Widgets -L/opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a -L/opt/android/ndk/platforms/android-9/arch-arm//usr/lib -lQt5Gui -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
     install -m 755 -p libtestAndroid.so /home/qt-android-projects/testandroid/build/android-build/libs/armeabi-v7a/libtestAndroid.so
     Makefile:1707: recipe for target 'install_target' failed
     install: cannot stat 'libtestAndroid.so': No such file or directory
     [install_target] Error 1 (ignored)
     11:41:30: The process "/usr/bin/make" exited normally.
     11:41:30: Removing directory /home/qt-android-projects/testandroid/build/android-build
     11:41:30: Starting: "/usr/bin/make" INSTALL_ROOT=/home/qt-android-projects/testandroid/build/android-build install
     /home/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/android-ndk-r10e/platforms/android-9/arch-arm/ -Wl,-soname,libtestAndroid.so -Wl,-rpath=/home/Qt5.5.1-for-android/5.5/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libtestAndroid.so main.o mainwindow.o moc_mainwindow.o   -L/home/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/home/android-ndk-r10e/platforms/android-9/arch-arm//usr/lib -L/home/Qt5.5.1-for-android/5.5/android_armv7/lib -lQt5Widgets -L/opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a -L/opt/android/ndk/platforms/android-9/arch-arm//usr/lib -lQt5Gui -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
     install -m 755 -p libtestAndroid.so /home/qt-android-projects/testandroid/build/android-build/libs/armeabi-v7a/libtestAndroid.so
     Makefile:1707: recipe for target 'install_target' failed
     install: cannot stat 'libtestAndroid.so': No such file or directory
     make: [install_target] Error 1 (ignored)
     11:41:30: The process "/usr/bin/make" exited normally.
     11:41:30: Starting: "/home/Qt5.5.1-for-android/5.5/android_armv7/bin/androiddeployqt" --input /home/qt-android-projects/testandroid/build/android-libtestAndroid.so-deployment-settings.json --output /home/qt-android-projects/testandroid/build/android-build --deployment bundled --android-platform android-23 --jdk /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-14.b27.fc21.x86_64 --ant /usr/bin/ant
     Cannot find application binary /home/qt-android-projects/testandroid/build/libtestAndroid.so.
     11:41:30: The process "/home/Qt5.5.1-for-android/5.5/android_armv7/bin/androiddeployqt" exited with code 2.
     Error while building/deploying project testAndroid (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.5.1))
     When executing step "Build Android APK"
     11:41:30: Elapsed time: 00:04.
    

    As the Qt's guide states, I did install :

    • Android SDK tool (r24.4.1)
    • Android NDK (r10e-rc4)
    • Apache ant (v. 1.9 in /usr/bin/)
    • Java SE Development Kit (java-1.8.0-openjdk-1.8.0.60-14.b27.fc21.x86_64)
    • Qt5 for Android (v. 5.5.1)

    I've installed the Android SDK tools with the ./android update sdk command.
    I'm using the Android API 23. I also tried with both API 9 and 22 and still get the problem.

    The paths (jdk, sdk, ndk, ant) seem correctly set in Qt Creator > Tools > Options > Android.

    Under Linux Fedora, I don't have spaces in my paths and nothing is better when I skip the make install step.

    Thanks



  • This post is deleted!


  • This post is deleted!


  • I just re-install the NDK and it works fine now...

    Sometimes it's strange...



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.