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 ?
-
Hi and welcome to devnet forum
See on https://doc.qt.io/qt-5/android-getting-started.html there you will found following section
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?
-
@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"
-
@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