Can't build project to android device



  • Hey everybody,
    I have not that big Qt knowledge .So far I set up my system so that qt asks me on which device I would like to deploy the project. There I can choose my MOTOROLA tablet, but when I try to build the project I get this ERROR:
    make: .../android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++: Command not found
    make: *** [main.o] Error 127
    I think the compiler is making some troubles ....
    Maybe someone can help me out
    Thanks


  • Moderators

    @Gram said:
    Hi and welcome to devent

    How and where did you install Qt?
    OS?
    Did you follow an installation guide?



  • @koahnig
    Hey koahning,
    I am using Ubuntu and installed Qt in my home directory with an install-file from qt 5.4.1.
    For getting started with qt and android I followed the instruction from the Qt-page:
    http://doc.qt.io/qt-5/androidgs.html


  • Moderators

    @Gram
    Did you follow the guide and you installed NDK and all the other packages?



  • @koahnig
    yes I did. But in Options->Android, Qt says "Qt versions for 4 architectures are missing". Do I need another Qt version ?


  • Moderators

    @Gram
    Did you install the Qt version through online installer?
    Basically after installing through the online installer with choosing also the Android versions you should be fine.



  • You should give NDK PATH and SDK PATH of Android to Qt Creator. You can download SDK and NDK From Android site



  • I installed JDK , Android-SDK and NDK. Qt found them all by its self. Qt-Android is installed, too. I did everything the tutorial said .


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Where is "android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin" located ? What do you have in there ?



  • @SGaist
    Hi SGaist and thank you :-)

    this folder is located in my home directory and you can find 3 files in there.

    • arm-linux-androideabi-c++
    • arm-linux-androideabi-gcc-4.9
    • arm-linux-androideabi-ld

  • Lifetime Qt Champion

    SymLinks ?



  • Ok I re-install the whole thing and now I got another error :-/. Maybe you know what could be wrong...
    Thank you all for your help

    14:42:10: Running steps for project android...
    14:42:10: Configuration unchanged, skipping qmake step.
    14:42:10: Starting: "/usr/bin/make"

    /home/schnj/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/schnj/android-ndk-r10e/platforms/android-9/arch-arm/ -Wl,-soname,libandroid.so -Wl,-rpath=/home/schnj/Qt/5.4/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libandroid.so main.o qrc_qml.o -L/home/schnj/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/home/schnj/android-ndk-r10e/platforms/android-9/arch-arm//usr/lib -L/home/schnj/Qt/5.4/android_armv7/lib -lQt5Quick -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 -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
    14:42:11: The process "/usr/bin/make" exited normally.
    14:42:11: Removing directory /home/schnj/QT-Projects/build-android-Clone_of_Android_for_armeabi_v7a_GCC_4_9_Qt_5_4_1-Debug/android-build
    14:42:11: Starting: "/usr/bin/make" INSTALL_ROOT=/home/schnj/QT-Projects/build-android-Clone_of_Android_for_armeabi_v7a_GCC_4_9_Qt_5_4_1-Debug/android-build install
    /home/schnj/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/schnj/android-ndk-r10e/platforms/android-9/arch-arm/ -Wl,-soname,libandroid.so -Wl,-rpath=/home/schnj/Qt/5.4/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libandroid.so main.o qrc_qml.o -L/home/schnj/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/home/schnj/android-ndk-r10e/platforms/android-9/arch-arm//usr/lib -L/home/schnj/Qt/5.4/android_armv7/lib -lQt5Quick -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 -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
    install -m 755 -p "libandroid.so" "/home/schnj/QT-Projects/build-android-Clone_of_Android_for_armeabi_v7a_GCC_4_9_Qt_5_4_1-Debug/android-build/libs/armeabi-v7a/libandroid.so"
    install: cannot stat 'libandroid.so': No such file or directory
    make: [install_target] Error 1 (ignored)

    14:42:11: The process "/usr/bin/make" exited normally.
    14:42:11: Starting: "/home/schnj/Qt/5.4/android_armv7/bin/androiddeployqt" --input /home/schnj/QT-Projects/build-android-Clone_of_Android_for_armeabi_v7a_GCC_4_9_Qt_5_4_1-Debug/android-libandroid.so-deployment-settings.json --output /home/schnj/QT-Projects/build-android-Clone_of_Android_for_armeabi_v7a_GCC_4_9_Qt_5_4_1-Debug/android-build --deployment bundled --android-platform android-22 --jdk /usr/lib/jvm/java-7-openjdk-amd64 --ant /usr/bin/ant
    Cannot find application binary /home/schnj/QT-Projects/build-android-Clone_of_Android_for_armeabi_v7a_GCC_4_9_Qt_5_4_1-Debug/libandroid.so.
    14:42:11: The process "/home/schnj/Qt/5.4/android_armv7/bin/androiddeployqt" exited with code 2.
    Error while building/deploying project android (kit: Clone of Android for armeabi-v7a (GCC 4.9, Qt 5.4.1))
    When executing step "Build Android APK"

    14:42:11: Elapsed time: 00:00.


  • Lifetime Qt Champion

    Did you name one of your target android ?



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