Qt 5.11.0 compile issue for Android



  • Hi,
    I’m trying to open a project from github on windows 10 using Qt 5.11 with NDK 17. When i open the project.pro file, i get a warning saying:

    C:\Users\poury\AppData\Local\Android\Sdk\ndk\android-ndk-r17c\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-gcc” is used by qmake, but “C:\Users\poury\AppData\Local\Android\Sdk\ndk\android-ndk-r17c\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe” is configured in the kit.
    Please update your kit (Android for armeabi-v7a (Clang Qt 5.11.0 for Android armv7)) or choose a mkspec for qmake that matches your target environment better
    

    And when i try to build the project, i get this error:

    linking debug\libQGroundControl.so
    arm-linux-androideabi-g++: error: oj\moc_CoordinateVector.obj: No such file or directory
    make: *** [debug\libQGroundControl.so] Error 1
    00:29:32: The process “C:\Users\poury\AppData\Local\Android\Sdk\ndk\android-ndk-r17c\prebuilt\windows-x86_64\bin\make.exe” exited with code 2.
    Error while building/deploying project qgroundcontrol (kit: Android for armeabi-v7a (Clang Qt 5.11.0 for Android armv7))
    When executing step “Make
    

    Any suggestion how to solve the issue ?
    2_1559982930155_kit.jpg 1_1559982930155_devices.jpg 0_1559982930154_compilers.jpg



  • @Pouria

    Hi and welcome to devnet forum

    See on https://doc.qt.io/qt-5/android-getting-started.html there you will found following section

    0_1559988365784_821f49eb-1de9-41fd-a26f-6a54fee0a683-image.png

    Your current NDK version is r17c. Either you install at least an older NDK version or you need to switch to Qt 5.12. I recommend to upgrade to Qt5.12.



  • @koahnig , thank you for your response, i really appreciate it. i did as you said, the previous error is gone, but i get a new error :

    clang++.exe: error: no such file or directory: 'obj\moc_QGCAppliction.obj'
    make: *** [debug\libQGroundControl.so] Error 1
    22:41:39: The process "C:\Users\poury\AppData\Local\Android\Sdk\ndk\19.2.5345600\prebuilt\windows-x86_64\bin\make.exe" exited with code 2.
    Error while building/deploying project qgroundcontrol (kit: Android for armeabi-v7a (Clang Qt 5.12.0 for Android ARMv7))
    When executing step "Make"
    

    how should i resolve this one?



  • @Pouria

    Right click on project and on "Run qmake" afterwards a "Rebuild all". Check if this is helping to resolve the problem.



  • @koahnig
    it shows a new error :

    error: unable to open output file 'obj\QGeoTiledMappingManagerEngineQGC.obj': 'Permission denied'
    1 error generated.
    compiling C:\Users\poury\Documents\GitHub\qgroundcontrol\libs\shapelib\safileio.c 
    compiling C:\Users\poury\Documents\GitHub\qgroundcontrol\src\api\QGCCorePlugin.cc 
    compiling C:\Users\poury\Documents\GitHub\qgroundcontrol\src\api\QGCOptions.cc 
    compiling C:\Users\poury\Documents\GitHub\qgroundcontrol\src\api\QGCSettings.cc 
    compiling C:\Users\poury\Documents\GitHub\qgroundcontrol\src\api\QmlComponentInfo.cc 
    compiling C:\Users\poury\Documents\GitHub\qgroundcontrol\src\comm\MavlinkMessagesTimer.cc 
    make: *** [obj\QGeoTiledMappingManagerEngineQGC.obj] Error 1
    make: *** Waiting for unfinished jobs....
    02:19:56: The process "C:\Users\poury\AppData\Local\Android\Sdk\ndk\android-ndk-r20-windows-x86_64\android-ndk-r20\prebuilt\windows-x86_64\bin\make.exe" exited with code 2.
    Error while building/deploying project qgroundcontrol (kit: Android for armeabi-v7a (Clang Qt 5.12.0 for Android ARMv7))
    When executing step "Make"
    


  • @Pouria

    Could be an interference from anti-virus app. You need to check if the AV-app denies access there.



  • @koahnig
    there was no access deny, but anyway i turned off the AV and i still get an error, it's driving me crazy!
    what about using qt 5.11 with NDK 10, do you think if i downgrade would it help ?

    clang  : error: no such file or directory: 'obj\moc_PositionManagerobj'
    make: *** [debug\libQGroundControl.so] Error 1
    17:36:35: The process "C:\Users\poury\AppData\Local\Android\Sdk\ndk\android-ndk-r20-windows-x86_64\android-ndk-r20\prebuilt\windows-x86_64\bin\make.exe" exited with code 2.
    Error while building/deploying project qgroundcontrol (kit: Android for armeabi-v7a (Clang Qt 5.12.0 for Android ARMv7))
    When executing step "Make
    


  • @Pouria

    You can try to downgrade. I have done some tests with Qt5.11.3 and changed to Qt5.12.0. BAsically you could switch forth and back. The only nuisance was the required change of ndk version.


Log in to reply