[Qbs] Issues building for Android

Raphael Cotty raphael.cotty at gmail.com
Thu Oct 15 12:17:24 CEST 2020


Hi,
About the use of QtApplication instead of CppApplication in the wizard:
I don't think it's a QtCreator issue. It's a qbs regression actually.
The QtApplication.qbs not only adds a Depends on Qt.Core but it also
changes the targetName for Android (in multiplex).
Using the CppApplication.qbs even with a Depends on Qt.Core will fail on
Android.

Is it possible to move the issue to qbs?
If not then I'll add one to discuss the different ways to solve it.
Raph

Le mer. 14 oct. 2020 à 21:49, Ola Røer Thorsen <ola at silentwings.no> a
écrit :

> ons. 14. okt. 2020 kl. 21:03 skrev Raphael Cotty <raphael.cotty at gmail.com
> >:
>
>> Hi,
>> Just tried the Qt Quick wizard. If you change the CppApplication into
>> QtGuiApplication then it works (instead of QtApplication).
>>
>>
> Thanks again everyone. So, my previous build error was eliminated by
> wiping the build directory completely and starting from scratch. Maybe
> something is not cleaned up properly in the build directory even when doing
> clean rebuild (stuff created from the android tools, not the c++ compiler).
> Googling the internet for the "duplicate class" problem turned up some
> others having that issue that aren't using Qbs, recommending just wiping
> all build artifacts.
>
> Starting everything from scratch but with a QtApplication didn't work for
> me, I needed to set those two extra properties in the Qbs profile manually.
> But then it works! Finally, my app runs on the target Android device.
>
> Summary:
> - Clean install of QtCreator letting it set up Android SDK/NDK doesn't
> quite work, might need to set the two additional Qbs properties in the kit
> manually. In my case:
> Android.sdk.buildToolsVersion: 29.0.2
> Android.sdk.platform: android-29
> - Use QtApplication, not CppApplication. The QtCreator-wizard could need
> this change to avoid more confusion. Reported it here:
> https://bugreports.qt.io/browse/QTCREATORBUG-24783
> - There might be some cleanup-issue in the build artifacts when messing
> around like I just did, causing the duplicate class error. Quick fix was to
> delete the whole build directory and try again.
> - Qt 5.15.x does not work for Android with Qbs yet, so I'll stick with Qt
> 5.14.
>
> Best regards,
> Ola
>
>
> _______________________________________________
> Qbs mailing list
> Qbs at qt-project.org
> https://lists.qt-project.org/listinfo/qbs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20201015/81212719/attachment.html>


More information about the Qbs mailing list